BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bslstl::Variant_CopyAssignVisitor< t_VARIANT > Class Template Reference

#include <bslstl_variant.h>

Public Member Functions

 Variant_CopyAssignVisitor (t_VARIANT *variant)
 
template<size_t t_INDEX, class t_TYPE >
void operator() (bsl::in_place_index_t< t_INDEX >, const t_TYPE &value) const
 

Detailed Description

template<class t_VARIANT>
class bslstl::Variant_CopyAssignVisitor< t_VARIANT >

This component-private class is a visitor that is used to implement the copy assignment operator for bsl::variant.

See bslstl_variant

Constructor & Destructor Documentation

◆ Variant_CopyAssignVisitor()

template<class t_VARIANT >
bslstl::Variant_CopyAssignVisitor< t_VARIANT >::Variant_CopyAssignVisitor ( t_VARIANT *  variant)
inlineexplicit

Create a Variant_CopyAssignVisitor object that, when invoked, will copy-assign to the active alternative of the specified variant.

Member Function Documentation

◆ operator()()

template<class t_VARIANT >
template<size_t t_INDEX, class t_TYPE >
void bslstl::Variant_CopyAssignVisitor< t_VARIANT >::operator() ( bsl::in_place_index_t< t_INDEX >  ,
const t_TYPE &  value 
) const
inline

Copy-assign to the active alternative of *d_variant_p from the specified value (i.e. the alternative that is being visited). The behavior is undefined unless (template parameter) t_INDEX is the index of the active alternative of *d_variant_p (or, in C++03, the index of an alternative that has the same type as the active alternative).


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