BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bslstl::Optional_Data< t_TYPE, t_IS_TRIVIALLY_DESTRUCTIBLE > Struct Template Reference

#include <bslstl_optional.h>

Inheritance diagram for bslstl::Optional_Data< t_TYPE, t_IS_TRIVIALLY_DESTRUCTIBLE >:
bslstl::Optional_DataImp< t_TYPE >

Public Member Functions

 ~Optional_Data ()
 Destroy the managed value_type object, if it exists.
 
- Public Member Functions inherited from bslstl::Optional_DataImp< t_TYPE >
 Optional_DataImp () BSLS_KEYWORD_NOEXCEPT
 Create an empty Optional_DataImp object.
 
template<class... t_ARGS>
t_TYPE & emplace (bslma::Allocator *allocator, BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS)... args)
 
void reset () BSLS_KEYWORD_NOEXCEPT
 Destroy the value_type object in d_buffer, if any.
 
t_TYPE & value ()
 
bool hasValue () const BSLS_KEYWORD_NOEXCEPT
 Return true if this objects has a value, and false otherwise.
 
const t_TYPE & value () const
 

Detailed Description

template<class t_TYPE, bool t_IS_TRIVIALLY_DESTRUCTIBLE = bslstl::Optional_IsTriviallyDestructible<t_TYPE>::value>
struct bslstl::Optional_Data< t_TYPE, t_IS_TRIVIALLY_DESTRUCTIBLE >

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.

Constructor & Destructor Documentation

◆ ~Optional_Data()

template<class t_TYPE , bool t_IS_TRIVIALLY_DESTRUCTIBLE>
bslstl::Optional_Data< t_TYPE, t_IS_TRIVIALLY_DESTRUCTIBLE >::~Optional_Data ( )

The documentation for this struct was generated from the following file: