|
25.02
|
#include <Optional.hpp>
Public Types | |
| using | BaseSwitch = OptionalReferenceSwitch< std::is_reference< T >::value, T > |
Public Types inherited from OptionalReferenceSwitch< std::is_reference< T >::value, T > | |
| using | Base = OptionalBase |
Public Member Functions | |
| Optional () noexcept | |
| Optional (const T &value) | |
| Optional & | operator= (const Optional &other)=default |
| Optional (EmptyOptional empty) | |
| Optional (const Optional &other) | |
| Optional (const BaseSwitch &other) | |
| template<class... Args> | |
| Optional (ConstructInPlace, Args &&... args) | |
| bool | operator== (const Optional< T > &rhs) const |
| Two optionals are considered equal if they are both empty or both contain values which themselves are considered equal (via their own == operator). More... | |
Public Member Functions inherited from OptionalReferenceSwitch< std::is_reference< T >::value, T > | |
| OptionalReferenceSwitch () noexcept | |
| OptionalReferenceSwitch (EmptyOptional) noexcept | |
| OptionalReferenceSwitch (const T &value) | |
| OptionalReferenceSwitch (ConstructInPlace, Args &&... args) | |
| OptionalReferenceSwitch (const OptionalReferenceSwitch &other) | |
| OptionalReferenceSwitch & | operator= (const T &value) |
| OptionalReferenceSwitch & | operator= (const OptionalReferenceSwitch &other) |
| OptionalReferenceSwitch & | operator= (EmptyOptional) |
| ~OptionalReferenceSwitch () | |
| void | reset () |
| const T & | value () const |
| T & | value () |
Public Member Functions inherited from OptionalBase | |
| OptionalBase () noexcept | |
| bool | has_value () const noexcept |
| operator bool () const noexcept | |
| Conversion to bool, so can be used in if-statements and similar contexts expecting a bool. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from OptionalBase | |
| OptionalBase (bool hasValue) noexcept | |
Protected Attributes inherited from OptionalBase | |
| bool | m_HasValue |
Definition at line 270 of file Optional.hpp.
| using BaseSwitch = OptionalReferenceSwitch<std::is_reference<T>::value, T> |
Definition at line 273 of file Optional.hpp.
|
inlinenoexcept |
Definition at line 275 of file Optional.hpp.
|
inline |
Definition at line 276 of file Optional.hpp.
|
inline |
Definition at line 278 of file Optional.hpp.
Definition at line 279 of file Optional.hpp.
|
inline |
Definition at line 280 of file Optional.hpp.
|
inlineexplicit |
Definition at line 283 of file Optional.hpp.
|
inline |
Two optionals are considered equal if they are both empty or both contain values which themselves are considered equal (via their own == operator).
Definition at line 288 of file Optional.hpp.
References OptionalBase::has_value(), and OptionalReferenceSwitch< IsReference, T >::value().