nonstd::variants Namespace Reference

Namespaces

 detail
 
 std11
 
 std17
 type traits C++17:
 

Classes

class  monostate
 
class  variant
 
struct  variant_alternative
 
struct  variant_alternative< K, variant< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 > >
 
struct  variant_size
 
struct  variant_size< variant< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 > >
 

Functions

template<class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 >
R & get (variant< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 > &v, nonstd::in_place_t(&)(nonstd::detail::in_place_type_tag< R >)=nonstd::in_place_type< R >)
 
template<class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 >
R const & get (variant< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 > const &v, nonstd::in_place_t(&)(nonstd::detail::in_place_type_tag< R >)=nonstd::in_place_type< R >)
 
template<std::size_t K, class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 >
variant_alternative< K, variant< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 > >::type & get (variant< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 > &v, nonstd::in_place_t(&)(nonstd::detail::in_place_index_tag< K >)=nonstd::in_place_index< K >)
 
template<std::size_t K, class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 >
variant_alternative< K, variant< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 > >::type const & get (variant< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 > const &v, nonstd::in_place_t(&)(nonstd::detail::in_place_index_tag< K >)=nonstd::in_place_index< K >)
 
template<class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 >
std11::add_pointer< T >::type get_if (variant< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 > *pv, nonstd::in_place_t(&)(nonstd::detail::in_place_type_tag< T >)=nonstd::in_place_type< T >)
 
template<class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 >
std11::add_pointer< const T >::type get_if (variant< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 > const *pv, nonstd::in_place_t(&)(nonstd::detail::in_place_type_tag< T >)=nonstd::in_place_type< T >)
 
template<std::size_t K, class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 >
std11::add_pointer< typename variant_alternative< K, variant< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 > >::type >::type get_if (variant< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 > *pv, nonstd::in_place_t(&)(nonstd::detail::in_place_index_tag< K >)=nonstd::in_place_index< K >)
 
template<std::size_t K, class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 >
std11::add_pointer< const typename variant_alternative< K, variant< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 > >::type >::type get_if (variant< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 > const *pv, nonstd::in_place_t(&)(nonstd::detail::in_place_index_tag< K >)=nonstd::in_place_index< K >)
 
template<class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 >
bool holds_alternative (variant< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 > const &v)
 
bool operator!= (monostate, monostate)
 
template<class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 >
bool operator!= (variant< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 > const &v, variant< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 > const &w)
 
bool operator< (monostate, monostate)
 
template<class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 >
bool operator< (variant< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 > const &v, variant< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 > const &w)
 
bool operator<= (monostate, monostate)
 
template<class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 >
bool operator<= (variant< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 > const &v, variant< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 > const &w)
 
bool operator== (monostate, monostate)
 
template<class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 >
bool operator== (variant< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 > const &v, variant< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 > const &w)
 
bool operator> (monostate, monostate)
 
template<class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 >
bool operator> (variant< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 > const &v, variant< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 > const &w)
 
bool operator>= (monostate, monostate)
 
template<class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 >
bool operator>= (variant< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 > const &v, variant< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 > const &w)
 
template<class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 >
void swap (variant< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 > &a, variant< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 > &b)
 
template<typename R , typename Visitor , typename V1 >
visit (const Visitor &v, V1 const &arg1)
 
template<typename R , typename Visitor , typename V1 , typename V2 >
visit (const Visitor &v, V1 const &arg1, V2 const &arg2)
 
template<typename R , typename Visitor , typename V1 , typename V2 , typename V3 >
visit (const Visitor &v, V1 const &arg1, V2 const &arg2, V3 const &arg3)
 
template<typename R , typename Visitor , typename V1 , typename V2 , typename V3 , typename V4 >
visit (const Visitor &v, V1 const &arg1, V2 const &arg2, V3 const &arg3, V4 const &arg4)
 
template<typename R , typename Visitor , typename V1 , typename V2 , typename V3 , typename V4 , typename V5 >
visit (const Visitor &v, V1 const &arg1, V2 const &arg2, V3 const &arg3, V4 const &arg4, V5 const &arg5)
 

Variables

static const std::size_t variant_npos = static_cast<std::size_t>( -1 )
 

Function Documentation

template<class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 >
R& nonstd::variants::get ( variant< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 > &  v,
nonstd::in_place_t(&)(nonstd::detail::in_place_type_tag< R >)  = nonstd::in_place_type< R > 
)
inline

Definition at line 1753 of file variant.hpp.

template<class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 >
R const& nonstd::variants::get ( variant< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 > const &  v,
nonstd::in_place_t(&)(nonstd::detail::in_place_type_tag< R >)  = nonstd::in_place_type< R > 
)
inline

Definition at line 1759 of file variant.hpp.

template<std::size_t K, class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 >
variant_alternative< K, variant<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> >::type& nonstd::variants::get ( variant< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 > &  v,
nonstd::in_place_t(&)(nonstd::detail::in_place_index_tag< K >)  = nonstd::in_place_index< K > 
)
inline

Definition at line 1766 of file variant.hpp.

template<std::size_t K, class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 >
variant_alternative< K, variant<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> >::type const& nonstd::variants::get ( variant< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 > const &  v,
nonstd::in_place_t(&)(nonstd::detail::in_place_index_tag< K >)  = nonstd::in_place_index< K > 
)
inline

Definition at line 1781 of file variant.hpp.

template<class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 >
std11::add_pointer<T>::type nonstd::variants::get_if ( variant< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 > *  pv,
nonstd::in_place_t(&)(nonstd::detail::in_place_type_tag< T >)  = nonstd::in_place_type< T > 
)
inline

Definition at line 1842 of file variant.hpp.

template<class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 >
std11::add_pointer<const T>::type nonstd::variants::get_if ( variant< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 > const *  pv,
nonstd::in_place_t(&)(nonstd::detail::in_place_type_tag< T >)  = nonstd::in_place_type< T > 
)
inline

Definition at line 1849 of file variant.hpp.

template<std::size_t K, class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 >
std11::add_pointer< typename variant_alternative<K, variant<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> >::type >::type nonstd::variants::get_if ( variant< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 > *  pv,
nonstd::in_place_t(&)(nonstd::detail::in_place_index_tag< K >)  = nonstd::in_place_index< K > 
)
inline

Definition at line 1856 of file variant.hpp.

template<std::size_t K, class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 >
std11::add_pointer< const typename variant_alternative<K, variant<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> >::type >::type nonstd::variants::get_if ( variant< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 > const *  pv,
nonstd::in_place_t(&)(nonstd::detail::in_place_index_tag< K >)  = nonstd::in_place_index< K > 
)
inline

Definition at line 1863 of file variant.hpp.

template<class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 >
bool nonstd::variants::holds_alternative ( variant< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 > const &  v)
inline

Definition at line 1747 of file variant.hpp.

bool nonstd::variants::operator!= ( monostate  ,
monostate   
)
inline

Definition at line 1114 of file variant.hpp.

template<class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 >
bool nonstd::variants::operator!= ( variant< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 > const &  v,
variant< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 > const &  w 
)
inline

Definition at line 2296 of file variant.hpp.

bool nonstd::variants::operator< ( monostate  ,
monostate   
)
inline

Definition at line 1109 of file variant.hpp.

template<class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 >
bool nonstd::variants::operator< ( variant< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 > const &  v,
variant< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 > const &  w 
)
inline

Definition at line 2304 of file variant.hpp.

bool nonstd::variants::operator<= ( monostate  ,
monostate   
)
inline

Definition at line 1111 of file variant.hpp.

template<class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 >
bool nonstd::variants::operator<= ( variant< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 > const &  v,
variant< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 > const &  w 
)
inline

Definition at line 2324 of file variant.hpp.

bool nonstd::variants::operator== ( monostate  ,
monostate   
)
inline

Definition at line 1113 of file variant.hpp.

template<class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 >
bool nonstd::variants::operator== ( variant< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 > const &  v,
variant< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 > const &  w 
)
inline

Definition at line 2286 of file variant.hpp.

bool nonstd::variants::operator> ( monostate  ,
monostate   
)
inline

Definition at line 1110 of file variant.hpp.

template<class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 >
bool nonstd::variants::operator> ( variant< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 > const &  v,
variant< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 > const &  w 
)
inline

Definition at line 2316 of file variant.hpp.

bool nonstd::variants::operator>= ( monostate  ,
monostate   
)
inline

Definition at line 1112 of file variant.hpp.

template<class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 >
bool nonstd::variants::operator>= ( variant< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 > const &  v,
variant< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 > const &  w 
)
inline

Definition at line 2332 of file variant.hpp.

template<class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 >
void nonstd::variants::swap ( variant< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 > &  a,
variant< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 > &  b 
)
inline

Definition at line 1892 of file variant.hpp.

template<typename R , typename Visitor , typename V1 >
R nonstd::variants::visit ( const Visitor &  v,
V1 const &  arg1 
)
inline

Definition at line 2194 of file variant.hpp.

template<typename R , typename Visitor , typename V1 , typename V2 >
R nonstd::variants::visit ( const Visitor &  v,
V1 const &  arg1,
V2 const &  arg2 
)
inline

Definition at line 2200 of file variant.hpp.

template<typename R , typename Visitor , typename V1 , typename V2 , typename V3 >
R nonstd::variants::visit ( const Visitor &  v,
V1 const &  arg1,
V2 const &  arg2,
V3 const &  arg3 
)
inline

Definition at line 2206 of file variant.hpp.

template<typename R , typename Visitor , typename V1 , typename V2 , typename V3 , typename V4 >
R nonstd::variants::visit ( const Visitor &  v,
V1 const &  arg1,
V2 const &  arg2,
V3 const &  arg3,
V4 const &  arg4 
)
inline

Definition at line 2212 of file variant.hpp.

template<typename R , typename Visitor , typename V1 , typename V2 , typename V3 , typename V4 , typename V5 >
R nonstd::variants::visit ( const Visitor &  v,
V1 const &  arg1,
V2 const &  arg2,
V3 const &  arg3,
V4 const &  arg4,
V5 const &  arg5 
)
inline

Definition at line 2218 of file variant.hpp.

Variable Documentation

const std::size_t nonstd::variants::variant_npos = static_cast<std::size_t>( -1 )
static

Definition at line 1166 of file variant.hpp.