DUECA/DUSIME
|
Make fixed-size objects optional, using a boolean flag for "null/nil/None" values. More...
Public Types | |
typedef T | value_type |
Value objects type. | |
Public Member Functions | |
fix_optional (const value_type &defval) | |
constructor with default value for the data More... | |
fix_optional () | |
constructor without default value for the data | |
fix_optional (const fix_optional< T > &other) | |
copy constructor; copies the data | |
template<typename D > | |
fix_optional (const D &defval) | |
copy constructor with a conversion to value | |
template<class InputIt > | |
fix_optional (InputIt first, InputIt last) | |
construct from iterators | |
fix_optional< T > & | operator= (const fix_optional< T > &other) |
assignment operator | |
fix_optional< T > & | operator= (const T &val) |
assignment operator, to value type | |
template<typename D > | |
fix_optional< T > & | operator= (const D &val) |
Assignment operator, with conversion to value. | |
bool | operator== (const fix_optional< T > &other) const |
equality test | |
bool | operator!= (const fix_optional< T > &other) const |
inequality test | |
Public Attributes | |
bool | valid |
Object is valid, filled, non-null. | |
value_type | value |
Encapsulated value. | |
Static Public Attributes | |
static constexpr const char * | classname = "fix_optional" |
Name. | |
Make fixed-size objects optional, using a boolean flag for "null/nil/None" values.
T | Datatype. |
|
inline |
constructor with default value for the data
defval | default fill value |