|
| constexpr | Variant ()=default |
| | default constructor.
|
| |
| constexpr | Variant (const Variant &)=default |
| | copy constructor.
|
| |
| constexpr | Variant (Variant &&)=default |
| | move constructor.
|
| |
| template<typename T , typename Match = match_t <T&&, Ts...>, typename = std::enable_if_t <is_unique <Match, Ts...>::value && std::is_constructible <Match, T&&>::value>> |
| constexpr | Variant (T &&t) noexcept |
| | constructs a Variant holding the alternative selected by overload resolution.
|
| |
| template<typename T , typename... Args, typename = std::enable_if_t <is_unique <T, Ts...>::value && std::is_constructible <T, Args&&...>::value>> |
| constexpr | Variant (in_place_type_t< T >, Args &&... args) |
| | constructs a Variant with the specified alternative T.
|
| |
| template<typename T , typename Up , typename... Args, typename = std::enable_if_t <is_unique <T, Ts...>::value && std::is_constructible <T, std::initializer_list <Up>&, Args&&...>::value>> |
| constexpr | Variant (in_place_type_t< T >, std::initializer_list< Up > il, Args &&... args) |
| | constructs a Variant with the specified alternative T.
|
| |
| template<std::size_t I, typename... Args, typename = std::enable_if_t <std::is_constructible < find_element_t <I, Ts...>, Args&&...>::value>> |
| constexpr | Variant (in_place_index_t< I >, Args &&... args) |
| | constructs a variant with the alternative T specified by the index I.
|
| |
| template<std::size_t I, typename Up , typename... Args, typename = std::enable_if_t <std::is_constructible < find_element_t <I, Ts...>, std::initializer_list <Up>&, Args&&...>::value>> |
| constexpr | Variant (in_place_index_t< I >, std::initializer_list< Up > il, Args &&... args) |
| | constructs a variant with the alternative T specified by the index I.
|
| |
| virtual | ~Variant ()=default |
| | destroy the Variant instance.
|
| |
| constexpr Variant & | operator= (const Variant &other)=default |
| | copy assignment.
|
| |
| constexpr Variant & | operator= (Variant &&other)=default |
| | move assignment.
|
| |
| template<typename T , typename Match = match_t <T&&, Ts...>> |
| constexpr std::enable_if_t< is_unique< Match, Ts... >::value &&std::is_constructible< Match, T && >::value, Variant & > | operator= (T &&t) noexcept |
| | assign a Variant holding the alternative selected by overload resolution.
|
| |
| template<typename T > |
| constexpr std::enable_if_t< is_unique< T, Ts... >::value, bool > | is () const |
| | check that the member type in use is the same than the one specified.
|
| |
| template<std::size_t I> |
| constexpr std::enable_if_t< is_index< I, Ts... >::value, bool > | is () const |
| | check that the index in use is the same than the one specified.
|
| |
| template<typename T , typename... Args> |
| constexpr std::enable_if_t< is_unique< T, Ts... >::value &&std::is_constructible< T, Args &&... >::value, T & > | set (Args &&...args) |
| | set the variable type of the object identified by type and assign it a value.
|
| |
| template<typename T , typename Up , typename... Args> |
| constexpr std::enable_if_t< is_unique< T, Ts... >::value &&std::is_constructible< T, std::initializer_list< Up > &, Args &&... >::value, T & > | set (std::initializer_list< Up > il, Args &&... args) |
| | set the variable type of the object identified by type and assign it a value.
|
| |
| template<std::size_t I, typename... Args> |
| constexpr std::enable_if_t< std::is_constructible< find_element_t< I, Ts... >, Args &&... >::value, find_element_t< I, Ts... > & > | set (Args &&...args) |
| | set the variable type of the object identified by index and assign it a value.
|
| |
| template<std::size_t I, class Up , class... Args> |
| constexpr std::enable_if_t< std::is_constructible< find_element_t< I, Ts... >, std::initializer_list< Up > &, Args &&... >::value, find_element_t< I, Ts... > & > | set (std::initializer_list< Up > il, Args &&... args) |
| | set the variable type of the object identified by index and assign it a value.
|
| |
| template<typename T > |
| constexpr std::enable_if_t< is_unique< T, Ts... >::value, T & > | get () |
| | get the variable value of the object type identified by type.
|
| |
| template<typename T > |
| constexpr std::enable_if_t< is_unique< T, Ts... >::value, const T & > | get () const |
| | get the variable value of the object type identified by type.
|
| |
| template<std::size_t I> |
| constexpr std::enable_if_t< is_index< I, Ts... >::value, find_element_t< I, Ts... > & > | get () |
| | get the variable value of the object type identified by index.
|
| |
| template<std::size_t I> |
| constexpr std::enable_if_t< is_index< I, Ts... >::value, const find_element_t< I, Ts... > & > | get () const |
| | get the variable value of the object type identified by index.
|
| |
| template<typename T > |
| constexpr std::enable_if_t< is_unique< T, Ts... >::value, T * > | getIf () |
| | get the variable value address of the object type identified by type.
|
| |
| template<typename T > |
| constexpr std::enable_if_t< is_unique< T, Ts... >::value, const T * > | getIf () const |
| | get the variable value address of the object type identified by type.
|
| |
| template<std::size_t I> |
| constexpr std::enable_if_t< is_index< I, Ts... >::value, find_element_t< I, Ts... > * > | getIf () |
| | get the variable value address of the object type identified by index.
|
| |
| template<std::size_t I> |
| constexpr std::enable_if_t< is_index< I, Ts... >::value, const find_element_t< I, Ts... > * > | getIf () const |
| | get the variable value address of the object type identified by index.
|
| |
| constexpr std::size_t | index () const noexcept |
| | return the index of the alternative that is currently held by the variant.
|
| |
template<typename... Ts>
class join::Variant< Ts >
variant class.