nonstd::variants Namespace Reference

## Namespaces

namespace | detail
namespace | std11
namespace | 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

variant_constexpr bool | operator< (monostate, monostate) variant_noexcept
variant_constexpr bool | operator> (monostate, monostate) variant_noexcept
variant_constexpr bool | operator<= (monostate, monostate) variant_noexcept
variant_constexpr bool | operator>= (monostate, monostate) variant_noexcept
variant_constexpr bool | operator== (monostate, monostate) variant_noexcept
variant_constexpr bool | operator!= (monostate, monostate) variant_noexcept
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) variant_noexcept
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_lite_in_place_type_t(R)=nonstd_lite_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_lite_in_place_type_t(R)=nonstd_lite_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_lite_in_place_index_t(K)=nonstd_lite_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_lite_in_place_index_t(K)=nonstd_lite_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_lite_in_place_type_t(T)=nonstd_lite_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< constT >::type | get_if (variant< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 > const *pv, nonstd_lite_in_place_type_t(T)=nonstd_lite_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< typenamevariant_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_lite_in_place_index_t(K)=nonstd_lite_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< consttypenamevariant_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_lite_in_place_index_t(K)=nonstd_lite_in_place_index(K))
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 >
R | visit (const Visitor &v, V1 const &arg1)
template<typename R , typename Visitor , typename V1 , typename V2 >
R | visit (const Visitor &v, V1 const &arg1, V2 const &arg2)
template<typename R , typename Visitor , typename V1 , typename V2 , typename V3 >
R | 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 >
R | 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 >
R | visit (const Visitor &v, V1 const &arg1, V2 const &arg2, V3 const &arg3, V4 const &arg4, V5 const &arg5)
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 >
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 >
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 >
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 >
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 >
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)

## Function Documentation

## get() [1/4]

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_lite_in_place_index_t(K) | = `nonstd_lite_in_place_index(K)`
| ) |  |

inline

Definition at line 2102 of file variant.hpp.

## get() [2/4]

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_lite_in_place_type_t(R) | = `nonstd_lite_in_place_type(R)`
| ) |  |

inline

Definition at line 2089 of file variant.hpp.

## get() [3/4]

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_lite_in_place_index_t(K) | = `nonstd_lite_in_place_index(K)`
| ) |  |

inline

Definition at line 2117 of file variant.hpp.

## get() [4/4]

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_lite_in_place_type_t(R) | = `nonstd_lite_in_place_type(R)`
| ) |  |

inline

Definition at line 2095 of file variant.hpp.

## get_if() [1/4]

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< typenamevariant_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_lite_in_place_index_t(K) | = `nonstd_lite_in_place_index(K)`
| ) |  |

inline

Definition at line 2192 of file variant.hpp.

## get_if() [2/4]

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_lite_in_place_type_t(T) | = `nonstd_lite_in_place_type(T)`
| ) |  |

inline

Definition at line 2178 of file variant.hpp.

## get_if() [3/4]

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< consttypenamevariant_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_lite_in_place_index_t(K) | = `nonstd_lite_in_place_index(K)`
| ) |  |

inline

Definition at line 2199 of file variant.hpp.

## get_if() [4/4]

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< constT >::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_lite_in_place_type_t(T) | = `nonstd_lite_in_place_type(T)`
| ) |  |

inline

Definition at line 2185 of file variant.hpp.

## holds_alternative()

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 2083 of file variant.hpp.

## operator!=() [1/2]

variant_constexpr bool nonstd::variants::operator!= | ( | monostate | ,
|  | monostate |
| ) |  |

inline

Definition at line 1206 of file variant.hpp.

## operator!=() [2/2]

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 2634 of file variant.hpp.

## operator<() [1/2]

variant_constexpr bool nonstd::variants::operator< | ( | monostate | ,
|  | monostate |
| ) |  |

inline

Definition at line 1201 of file variant.hpp.

## operator<() [2/2]

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 2642 of file variant.hpp.

## operator<=() [1/2]

variant_constexpr bool nonstd::variants::operator<= | ( | monostate | ,
|  | monostate |
| ) |  |

inline

Definition at line 1203 of file variant.hpp.

## operator<=() [2/2]

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 2662 of file variant.hpp.

## operator==() [1/2]

variant_constexpr bool nonstd::variants::operator== | ( | monostate | ,
|  | monostate |
| ) |  |

inline

Definition at line 1205 of file variant.hpp.

## operator==() [2/2]

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 2624 of file variant.hpp.

## operator>() [1/2]

variant_constexpr bool nonstd::variants::operator> | ( | monostate | ,
|  | monostate |
| ) |  |

inline

Definition at line 1202 of file variant.hpp.

## operator>() [2/2]

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 2654 of file variant.hpp.

## operator>=() [1/2]

variant_constexpr bool nonstd::variants::operator>= | ( | monostate | ,
|  | monostate |
| ) |  |

inline

Definition at line 1204 of file variant.hpp.

## operator>=() [2/2]

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 2670 of file variant.hpp.

## swap()

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 2228 of file variant.hpp.

## visit() [1/5]

template<typename R , typename Visitor , typename V1 >

R nonstd::variants::visit | ( | const Visitor & | v,
|  | V1 const & | arg1
| ) |  |

inline

Examples
  sample/tls_inspector/main.cpp.

Definition at line 2532 of file variant.hpp.

## visit() [2/5]

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 2538 of file variant.hpp.

## visit() [3/5]

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 2544 of file variant.hpp.

## visit() [4/5]

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 2550 of file variant.hpp.

## visit() [5/5]

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 2556 of file variant.hpp.