|
BDE 4.39.x Production Release
|
#include <bslstl_variant.h>
This struct provides a namespace for utility functions used implement various operations on bsl::variant.
See bslstl_variant
Static Public Member Functions | |
| template<class t_HEAD , class... t_TAIL> | |
| static bsl::variant< t_HEAD, t_TAIL... > & | asVariant (bsl::variant< t_HEAD, t_TAIL... > &v) |
| template<class t_HEAD , class... t_TAIL> | |
| static const bsl::variant< t_HEAD, t_TAIL... > & | asVariant (const bsl::variant< t_HEAD, t_TAIL... > &v) |
| template<class t_RET , size_t t_INDEX, class t_VARIANT > | |
| static t_RET & | get (t_VARIANT &variant) |
| template<class t_RET , size_t t_INDEX, class t_VARIANT > | |
| static t_RET & | get (const t_VARIANT &variant) |
| template<class t_RET , class t_VISITOR , class t_VARIANT > | |
| static t_RET | visit (t_VISITOR &visitor, t_VARIANT &variant) |
| template<class t_RET , class t_VISITOR , class t_VARIANT > | |
| static t_RET | visit (t_VISITOR &visitor, const t_VARIANT &variant) |
| template<class t_RET , class t_VISITOR , class t_VARIANT > | |
| static t_RET | moveVisit (t_VISITOR &visitor, t_VARIANT &variant) |
| template<class t_RET , class t_VISITOR , class t_VARIANT > | |
| static t_RET | visitId (t_VISITOR &visitor, t_VARIANT &variant) |
| template<class t_RET , class t_VISITOR , class t_VARIANT > | |
| static t_RET | visitId (t_VISITOR &visitor, const t_VARIANT &variant) |
| template<class t_RET , size_t t_INDEX, class t_VARIANT > | |
| static t_RET & | unsafeGet (t_VARIANT &variant) |
| template<class t_RET , size_t t_INDEX, class t_VARIANT > | |
| static t_RET & | unsafeGet (const t_VARIANT &variant) |
| template<class t_TYPE , class t_VARIANT > | |
| static t_TYPE & | unsafeGet (t_VARIANT &obj) |
| template<class t_TYPE , class t_VARIANT > | |
| static const t_TYPE & | unsafeGet (const t_VARIANT &obj) |
| template<class t_RET , class t_VARIANT_UNION > | |
| static t_RET & | getAlternative (bsl::in_place_index_t< 0 >, t_VARIANT_UNION &variantUnion) BSLS_KEYWORD_NOEXCEPT |
| template<class t_RET , size_t t_INDEX, class t_VARIANT_UNION > | |
| static t_RET & | getAlternative (bsl::in_place_index_t< t_INDEX >, t_VARIANT_UNION &variantUnion) BSLS_KEYWORD_NOEXCEPT |
| template<class t_VARIANT > | |
| static bool | Equal (const t_VARIANT &lhs, const t_VARIANT &rhs) |
| template<class t_VARIANT > | |
| static bool | NotEqual (const t_VARIANT &lhs, const t_VARIANT &rhs) |
| template<class t_VARIANT > | |
| static bool | LessThan (const t_VARIANT &lhs, const t_VARIANT &rhs) |
| template<class t_VARIANT > | |
| static bool | GreaterThan (const t_VARIANT &lhs, const t_VARIANT &rhs) |
| template<class t_VARIANT > | |
| static bool | LessOrEqual (const t_VARIANT &lhs, const t_VARIANT &rhs) |
| template<class t_VARIANT > | |
| static bool | GreaterOrEqual (const t_VARIANT &lhs, const t_VARIANT &rhs) |
|
inlinestatic |
Returns a reference to the specified v.
|
inlinestatic |
|
static |
|
static |
|
static |
Return a reference to the alternative with index (template parameter) t_INDEX in the specified variant. If t_INDEX is not the index of the currently active alternative, throw an exception of type bad_variant_access.
|
static |
Return a reference to the object managed by the first member of the specified variantUnion. It is the base case for the overload of getAlternative below. This function does not require friend access to Variant and has been added to Variant_ImpUtil for the purposes of avoiding free functions.
|
static |
Return a reference to the alternative with index (template parameter) t_INDEX in the specified variantUnion by recursively unravelling variantUnion until the desired alternative is at the head. t_INDEX shall be a valid alternative index.
t_INDEX has the same type as the active alternative of variantUnion. This function does not require friend access to Variant and has been added to Variant_ImpUtil for the purposes of avoiding free functions.
|
static |
Return the result of comparing the specified lhs with the specified rhs.
lhs and rhs hold the same alternative.
|
static |
|
static |
|
static |
|
static |
Invoke the specified visitor on a bslmf::MovableRef referring to the active alternative of the specified variant, implicitly converting the return type to the explicitly specified (template parameter) t_RET.
variant does not hold a value. This function does not require friend access to Variant and has been added to Variant_ImpUtil for the purposes of avoiding free functions.
|
static |
|
static |
|
static |
|
static |
Return a reference to const-qualified (template parameter) t_TYPE to the first alternative of the specified obj that has type t_TYPE, regardless of whether that is the active alternative.
variant is of type t_TYPE. This function does not require friend access to Variant and has been added to Variant_ImpUtil for the purposes of avoiding free functions.
|
static |
Return a reference to type (template parameter) 't_RET' to the alternative at (template parameter) 't_INDEX' in the specified 'variant', regardless of whether that is the active alternative.
|
static |
|
static |
Invoke the specified visitor on the active alternative of the specified variant, implicitly converting the return type to the explicitly specified (template parameter) t_RET.
variant does not hold a value. This function does not require friend access to Variant and has been added to Variant_ImpUtil for the purposes of avoiding free functions.
|
static |
|
static |
Invoke the specified visitor with a bsl::in_place_index_t<t_INDEX> tag (where t_INDEX is the index of the first alternative that has the same type as the active alternative of the specified variant) and the active alternative of variant, implicitly converting the return type to the explicitly specified (template parameter) t_RET.
variant does not hold a value. This function does not require friend access to Variant and has been added to Variant_ImpUtil for the purposes of avoiding free functions.