AWS IoT Device SDK C++ v2 1.44.1
AWS IoT Device SDK C++ v2
Loading...
Searching...
No Matches
Aws::Crt::VariantDetail::VariantImpl< Ts > Class Template Reference

#include <Variant.h>

Public Types

using FirstAlternative = typename ThisVariantAlternative<0>::type
using IndexT = VariantDetail::Index::VariantIndex
template<std::size_t Index>
using RawAlternativePointerT
template<std::size_t Index>
using ConstRawAlternativePointerT

Public Member Functions

 VariantImpl () noexcept(isFirstAlternativeNothrowDefaultConstructible)
 VariantImpl (const VariantImpl &other)
 VariantImpl (VariantImpl &&other)
template<typename T, EnableIfOtherIsThisVariantAlternative< T > = 1>
 VariantImpl (const T &val) noexcept(std::is_nothrow_constructible< typename std::decay< T >::type, decltype(val)>::value)
template<typename T, EnableIfOtherIsThisVariantAlternative< T > = 1>
 VariantImpl (T &&val) noexcept(std::is_nothrow_constructible< typename std::decay< T >::type, decltype(val)>::value)
template<typename T, typename... Args>
 VariantImpl (Aws::Crt::InPlaceTypeT< T >, Args &&...args)
VariantImploperator= (const VariantImpl &other)
VariantImploperator= (VariantImpl &&other)
template<typename T, typename... Args, EnableIfOtherIsThisVariantAlternative< T > = 1>
T & emplace (Args &&...args)
template<std::size_t Index, typename... Args>
auto emplace (Args &&...args) -> typename ThisVariantAlternative< Index >::type &
template<typename T, EnableIfOtherIsThisVariantAlternative< T > = 1>
bool holds_alternative () const
template<typename T, EnableIfOtherIsThisVariantAlternative< T > = 1>
T & get ()
template<typename T, EnableIfOtherIsThisVariantAlternative< T > = 1>
T * get_if ()
template<std::size_t Index>
auto get () -> typename ThisVariantAlternative< Index >::type &
template<typename T, EnableIfOtherIsThisVariantAlternative< T > = 1>
const T & get () const
template<typename T, EnableIfOtherIsThisVariantAlternative< T > = 1>
const T * get_if () const
template<std::size_t Index>
auto get () const -> const typename ThisVariantAlternative< Index >::type &
template<std::size_t Index>
auto get_if () -> RawAlternativePointerT< Index >
template<std::size_t Index>
auto get_if () const -> ConstRawAlternativePointerT< Index >
std::size_t index () const
 ~VariantImpl ()
template<typename VisitorT>
void Visit (VisitorT &&visitor)

Static Public Attributes

static constexpr bool isFirstAlternativeNothrowDefaultConstructible
static constexpr bool isFirstAlternativeDefaultConstructible
static constexpr std::size_t AlternativeCount = sizeof...(Ts)

Member Typedef Documentation

◆ ConstRawAlternativePointerT

template<typename... Ts>
template<std::size_t Index>
using Aws::Crt::VariantDetail::VariantImpl< Ts >::ConstRawAlternativePointerT
Initial value:
typename std::add_pointer<
typename std::add_const<typename ThisVariantAlternative<Index>::type>::type>::type

◆ FirstAlternative

template<typename... Ts>
using Aws::Crt::VariantDetail::VariantImpl< Ts >::FirstAlternative = typename ThisVariantAlternative<0>::type

◆ IndexT

template<typename... Ts>
using Aws::Crt::VariantDetail::VariantImpl< Ts >::IndexT = VariantDetail::Index::VariantIndex

◆ RawAlternativePointerT

template<typename... Ts>
template<std::size_t Index>
using Aws::Crt::VariantDetail::VariantImpl< Ts >::RawAlternativePointerT
Initial value:
typename std::add_pointer<typename ThisVariantAlternative<Index>::type>::type

Constructor & Destructor Documentation

◆ VariantImpl() [1/6]

template<typename... Ts>
Aws::Crt::VariantDetail::VariantImpl< Ts >::VariantImpl ( )
inlinenoexcept

◆ VariantImpl() [2/6]

template<typename... Ts>
Aws::Crt::VariantDetail::VariantImpl< Ts >::VariantImpl ( const VariantImpl< Ts > & other)
inline

◆ VariantImpl() [3/6]

template<typename... Ts>
Aws::Crt::VariantDetail::VariantImpl< Ts >::VariantImpl ( VariantImpl< Ts > && other)
inline

◆ VariantImpl() [4/6]

template<typename... Ts>
template<typename T, EnableIfOtherIsThisVariantAlternative< T > = 1>
Aws::Crt::VariantDetail::VariantImpl< Ts >::VariantImpl ( const T & val)
inlinenoexcept

◆ VariantImpl() [5/6]

template<typename... Ts>
template<typename T, EnableIfOtherIsThisVariantAlternative< T > = 1>
Aws::Crt::VariantDetail::VariantImpl< Ts >::VariantImpl ( T && val)
inlinenoexcept

◆ VariantImpl() [6/6]

template<typename... Ts>
template<typename T, typename... Args>
Aws::Crt::VariantDetail::VariantImpl< Ts >::VariantImpl ( Aws::Crt::InPlaceTypeT< T > ,
Args &&... args )
inlineexplicit

◆ ~VariantImpl()

template<typename... Ts>
Aws::Crt::VariantDetail::VariantImpl< Ts >::~VariantImpl ( )
inline

Member Function Documentation

◆ emplace() [1/2]

template<typename... Ts>
template<typename T, typename... Args, EnableIfOtherIsThisVariantAlternative< T > = 1>
T & Aws::Crt::VariantDetail::VariantImpl< Ts >::emplace ( Args &&... args)
inline

◆ emplace() [2/2]

template<typename... Ts>
template<std::size_t Index, typename... Args>
auto Aws::Crt::VariantDetail::VariantImpl< Ts >::emplace ( Args &&... args) -> typename ThisVariantAlternative< Index >::type &
inline

◆ get() [1/4]

template<typename... Ts>
template<typename T, EnableIfOtherIsThisVariantAlternative< T > = 1>
T & Aws::Crt::VariantDetail::VariantImpl< Ts >::get ( )
inline

◆ get() [2/4]

template<typename... Ts>
template<std::size_t Index>
auto Aws::Crt::VariantDetail::VariantImpl< Ts >::get ( ) -> typename ThisVariantAlternative< Index >::type &
inline

◆ get() [3/4]

template<typename... Ts>
template<typename T, EnableIfOtherIsThisVariantAlternative< T > = 1>
const T & Aws::Crt::VariantDetail::VariantImpl< Ts >::get ( ) const
inline

◆ get() [4/4]

template<typename... Ts>
template<std::size_t Index>
auto Aws::Crt::VariantDetail::VariantImpl< Ts >::get ( ) const -> const typename ThisVariantAlternative< Index >::type &
inline

◆ get_if() [1/4]

template<typename... Ts>
template<typename T, EnableIfOtherIsThisVariantAlternative< T > = 1>
T * Aws::Crt::VariantDetail::VariantImpl< Ts >::get_if ( )
inline

◆ get_if() [2/4]

template<typename... Ts>
template<std::size_t Index>
auto Aws::Crt::VariantDetail::VariantImpl< Ts >::get_if ( ) -> RawAlternativePointerT< Index >
inline

◆ get_if() [3/4]

template<typename... Ts>
template<typename T, EnableIfOtherIsThisVariantAlternative< T > = 1>
const T * Aws::Crt::VariantDetail::VariantImpl< Ts >::get_if ( ) const
inline

◆ get_if() [4/4]

template<typename... Ts>
template<std::size_t Index>
auto Aws::Crt::VariantDetail::VariantImpl< Ts >::get_if ( ) const -> ConstRawAlternativePointerT< Index >
inline

◆ holds_alternative()

template<typename... Ts>
template<typename T, EnableIfOtherIsThisVariantAlternative< T > = 1>
bool Aws::Crt::VariantDetail::VariantImpl< Ts >::holds_alternative ( ) const
inline

◆ index()

template<typename... Ts>
std::size_t Aws::Crt::VariantDetail::VariantImpl< Ts >::index ( ) const
inline

◆ operator=() [1/2]

template<typename... Ts>
VariantImpl & Aws::Crt::VariantDetail::VariantImpl< Ts >::operator= ( const VariantImpl< Ts > & other)
inline

◆ operator=() [2/2]

template<typename... Ts>
VariantImpl & Aws::Crt::VariantDetail::VariantImpl< Ts >::operator= ( VariantImpl< Ts > && other)
inline

◆ Visit()

template<typename... Ts>
template<typename VisitorT>
void Aws::Crt::VariantDetail::VariantImpl< Ts >::Visit ( VisitorT && visitor)
inline

Member Data Documentation

◆ AlternativeCount

template<typename... Ts>
std::size_t Aws::Crt::VariantDetail::VariantImpl< Ts >::AlternativeCount = sizeof...(Ts)
staticconstexpr

◆ isFirstAlternativeDefaultConstructible

template<typename... Ts>
bool Aws::Crt::VariantDetail::VariantImpl< Ts >::isFirstAlternativeDefaultConstructible
staticconstexpr
Initial value:
=
std::is_nothrow_constructible<FirstAlternative>::value

◆ isFirstAlternativeNothrowDefaultConstructible

template<typename... Ts>
bool Aws::Crt::VariantDetail::VariantImpl< Ts >::isFirstAlternativeNothrowDefaultConstructible
staticconstexpr
Initial value:
=
std::is_nothrow_default_constructible<FirstAlternative>::value

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