|
Dev Essential
1.6.3
|
An optional template as long as the std::optional is not available here. More...
#include <access_optional.h>
Public Types | |
| typedef T | value_type |
| defintion of the value type of this optional | |
Public Member Functions | |
| Optional () | |
| default CTOR | |
| Optional (Optional &&)=default | |
| move CTOR | |
| Optional (const Optional &)=default | |
| copy CTOR | |
| Optional & | operator= (Optional &&)=default |
| move assignment operator | |
| Optional & | operator= (const Optional &)=default |
| copy assignment operator | |
| ~Optional ()=default | |
| DTOR. | |
| Optional (const value_type &value) | |
| special copy CTOR | |
| Optional & | operator= (const value_type &value) |
| copy assignment operator | |
| Optional (value_type &&value) | |
| move CTOR | |
| Optional & | operator= (value_type &&value) |
| move assignment operator | |
| operator bool () const | |
| validation status of the optional | |
| operator value_type () const | |
| conversion to the value type | |
| value_type & | operator* () & |
| referenced access to the value | |
| value_type && | operator* () && |
| referenced access to the value | |
| const value_type & | operator* () const & |
| referenced access of the value | |
| const value_type && | operator* () const && |
| referenced access of the value | |
| void | reset () |
| invalidates the value | |
| value_type | get () & |
| return the value type as copy | |
| value_type && | get () && |
| steal value type | |
| value_type | get () const & |
| return the value type as copy | |
| value_type | get () const && |
| steal value type | |
| bool | operator== (const Optional &other) const |
| equality operator. | |
| bool | operator!= (const Optional &other) const |
| non equality operator. | |
Public Attributes | |
| bool | _valid = false |
| is valid or not | |
| value_type | _value = {} |
| the value if it is valid | |
An optional template as long as the std::optional is not available here.
| T | the value type |
|
inline |
special copy CTOR
| value | the value to copy |
|
inline |
move CTOR
| value | the value to move |
|
inline |
return the value type as copy
|
inline |
steal value type
|
inline |
return the value type as copy
|
inline |
steal value type
|
inline |
validation status of the optional
|
inline |
conversion to the value type
|
inline |
|
inline |
referenced access to the value
|
inline |
referenced access to the value
|
inline |
referenced access of the value
|
inline |
referenced access of the value
|
default |
copy assignment operator
|
inline |
|
default |
move assignment operator
|
inline |
|
inline |