BDE 4.39.x Production Release
Loading...
Searching...
No Matches
bslstl::Variant_DataImp< t_TYPE > Class Template Reference

#include <bslstl_variant.h>

Detailed Description

template<class t_TYPE>
class bslstl::Variant_DataImp< t_TYPE >

This component-private class manages an object of type (template parameter) t_TYPE that is stored in a variant object.

Note
Note that t_TYPE may be const-qualified, in which case the internally stored object is not const, but the interface of this class prevents modification thereof.

See bslstl_variant

Public Member Functions

 Variant_DataImp ()=default
 
t_TYPE & value ()
 
const t_TYPE & value () const
 

Constructor & Destructor Documentation

◆ Variant_DataImp()

template<class t_TYPE >
bslstl::Variant_DataImp< t_TYPE >::Variant_DataImp ( )
default

Create a Variant_DataImp object that holds an empty buffer.

Member Function Documentation

◆ value() [1/2]

template<class t_TYPE >
t_TYPE & bslstl::Variant_DataImp< t_TYPE >::value ( )
inline

Return a reference to the stored t_TYPE object.

Precondition
The behavior is undefined unless the enclosing union contains a t_TYPE object (i.e., the enclosing bsl::variant has an active alternative of type t_TYPE).

◆ value() [2/2]

template<class t_TYPE >
const t_TYPE & bslstl::Variant_DataImp< t_TYPE >::value ( ) const
inline

Return a const reference to the stored t_TYPE object.

Precondition
The behavior is undefined unless the enclosing union contains a t_TYPE object (i.e., the enclosing bsl::variant has an active alternative of type t_TYPE).

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