Component-private storage that destroys a non-trivial contained value.
Declared in <bslstl_optional.h>
template<
class t_TYPE,
bool t_IS_TRIVIALLY_DESTRUCTIBLE = bslstl::Optional_IsTriviallyDestructible<t_TYPE>::value>
struct Optional_Data
: Optional_DataImp<t_TYPE>
This component-private struct manages a value_type object in Optional_Base by inheriting from Optional_DataImp. In addition, this primary template properly destroys the owned instance of t_TYPE in its destructor.
| Name | Description |
|---|---|
Optional_DataImp<t_TYPE> | Component-private buffer managing an optional's contained value. |
| Name | Description |
|---|---|
~Optional_Data [destructor] | Destroy the managed value_type object, if it exists. |
emplace | Destroy any contained value and construct a new one in place. |
hasValue | Return true if this objects has a value, and false otherwise. |
reset | Destroy the value_type object in d_buffer, if any. |
value | value overloads |
| Name | Description |
|---|---|
Unnamed using | Inherit Optional_DataImp constructors from the base class. |
| Name | Description |
|---|---|
Optional_Data<t_TYPE, true> | Partial specialization for a trivially destructible contained value. |