20.11
|
#include <Optional.hpp>
Public Types | |
using | BaseSwitch = 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... | |
![]() | |
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 () |
![]() | |
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 | |
![]() | |
OptionalBase (bool hasValue) noexcept | |
![]() | |
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.