Nullable type. More...
Public Member Functions | |
nullable () BOND_NOEXCEPT_IF(std | |
Default constructor. More... | |
nullable (const allocator_type &alloc) | |
Construct nullable using specified allocator instance. More... | |
nullable (const nullable &other) | |
Copy constructor. More... | |
nullable (const T &value, const allocator_type &alloc={}) | |
Construct from an instance T. More... | |
nullable & | operator= (const nullable &other) |
Assignment operator. More... | |
bool | empty () const BOND_NOEXCEPT |
Checks if the object is null. More... | |
T & | value () BOND_NOEXCEPT |
Return reference to contained value. More... | |
const T & | value () const BOND_NOEXCEPT |
Return constant reference to contained value. More... | |
T & | operator* () BOND_NOEXCEPT |
Dereference operator. More... | |
const T & | operator* () const BOND_NOEXCEPT |
Dereference operator. More... | |
T & | set () |
Set to default instance of T and return reference to the value. More... | |
void | set (const T &value) |
Set to specified value. More... | |
void | reset () |
Reset to null. More... | |
void | clear () |
The same as reset. More... | |
Nullable type.
See User's Manual
bond::nullable< T, typename boost::disable_if< detail::use_value< T > >::type >::nullable | ( | ) |
Default constructor.
|
explicit |
Construct nullable using specified allocator instance.
bond::nullable< T, typename boost::disable_if< detail::use_value< T > >::type >::nullable | ( | const nullable< T, typename boost::disable_if< detail::use_value< T > >::type > & | other | ) |
Copy constructor.
|
explicit |
Construct from an instance T.
void bond::nullable< T, typename boost::disable_if< detail::use_value< T > >::type >::clear | ( | ) |
The same as reset.
bool bond::nullable< T, typename boost::disable_if< detail::use_value< T > >::type >::empty | ( | ) | const |
Checks if the object is null.
T & bond::nullable< T, typename boost::disable_if< detail::use_value< T > >::type >::operator* | ( | ) |
Dereference operator.
Undefined if the object is null
const T & bond::nullable< T, typename boost::disable_if< detail::use_value< T > >::type >::operator* | ( | ) | const |
Dereference operator.
Undefined if the object is null
nullable & bond::nullable< T, typename boost::disable_if< detail::use_value< T > >::type >::operator= | ( | const nullable< T, typename boost::disable_if< detail::use_value< T > >::type > & | other | ) |
Assignment operator.
void bond::nullable< T, typename boost::disable_if< detail::use_value< T > >::type >::reset | ( | ) |
Reset to null.
T & bond::nullable< T, typename boost::disable_if< detail::use_value< T > >::type >::set | ( | ) |
Set to default instance of T and return reference to the value.
void bond::nullable< T, typename boost::disable_if< detail::use_value< T > >::type >::set | ( | const T & | value | ) |
Set to specified value.
T & bond::nullable< T, typename boost::disable_if< detail::use_value< T > >::type >::value | ( | ) |
Return reference to contained value.
Undefined if the object is null
const T & bond::nullable< T, typename boost::disable_if< detail::use_value< T > >::type >::value | ( | ) | const |
Return constant reference to contained value.
Undefined if the object is null