|
26.01
|
This is the special case for reference types. More...
#include <Optional.hpp>
Public Types | |
| using | Base = OptionalBase |
| using | NonRefT = typename std::remove_reference<T>::type |
Public Member Functions | |
| OptionalReferenceSwitch () noexcept | |
| OptionalReferenceSwitch (EmptyOptional) noexcept | |
| OptionalReferenceSwitch (const OptionalReferenceSwitch &other) | |
| OptionalReferenceSwitch (T value) | |
| template<class... Args> | |
| OptionalReferenceSwitch (ConstructInPlace, Args &&... args)=delete | |
| 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. | |
Additional Inherited Members | |
Protected Member Functions inherited from OptionalBase | |
| OptionalBase (bool hasValue) noexcept | |
Protected Attributes inherited from OptionalBase | |
| bool | m_HasValue |
This is the special case for reference types.
This holds a pointer to the referenced type. This doesn't own the referenced memory and it never calls delete on the pointer.
Definition at line 191 of file Optional.hpp.
| using Base = OptionalBase |
Definition at line 194 of file Optional.hpp.
| using NonRefT = typename std::remove_reference<T>::type |
Definition at line 195 of file Optional.hpp.
|
inlinenoexcept |
Definition at line 197 of file Optional.hpp.
|
inlinenoexcept |
Definition at line 198 of file Optional.hpp.
|
inline |
Definition at line 200 of file Optional.hpp.
|
inline |
Definition at line 205 of file Optional.hpp.
|
delete |
|
inline |
Definition at line 234 of file Optional.hpp.
References OptionalReferenceSwitch< IsReference, T >::reset().
|
inline |
Definition at line 221 of file Optional.hpp.
References OptionalBase::has_value(), and OptionalBase::m_HasValue.
|
inline |
Definition at line 214 of file Optional.hpp.
References OptionalBase::m_HasValue, and OptionalReferenceSwitch< IsReference, T >::value().
|
inline |
Definition at line 228 of file Optional.hpp.
References OptionalReferenceSwitch< IsReference, T >::reset().
|
inline |
Definition at line 239 of file Optional.hpp.
References OptionalBase::m_HasValue.
|
inline |
Definition at line 255 of file Optional.hpp.
References OptionalBase::has_value().
|
inline |
Definition at line 245 of file Optional.hpp.
References OptionalBase::has_value().