|
| constexpr | Variant () |
| | default constructor.
|
| |
| constexpr | Variant (const Variant &other)=default |
| | copy constructor.
|
| |
| constexpr | Variant (const Variant &other) |
| | copy constructor.
|
| |
| constexpr | Variant (Variant &&other)=default |
| | move constructor.
|
| |
| constexpr | Variant (Variant &&other) noexcept |
| | move constructor.
|
| |
template<typename T , typename Match = match_t<T&&, Ts...>>
requires is_unique_v<Match, Ts...> && std::is_constructible_v<Match, T&&> |
| constexpr | Variant (T &&t) |
| | constructs a Variant holding the alternative selected by overload resolution.
|
| |
template<typename T , typename... Args>
requires is_unique_v<T, Ts...> && std::is_constructible_v<T, Args&&...> |
| constexpr | Variant (std::in_place_type_t< T >, Args &&... args) |
| | constructs a Variant with the specified alternative T.
|
| |
template<typename T , typename Up , typename... Args>
requires is_unique_v<T, Ts...> && std::is_constructible_v<T, std::initializer_list<Up>&, Args&&...> |
| constexpr | Variant (std::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>
requires std::is_constructible_v<std::tuple_element_t<I, std::tuple<Ts...>>, Args&&...> |
| constexpr | Variant (std::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>
requires std::is_constructible_v<std::tuple_element_t<I, std::tuple<Ts...>>, std::initializer_list<Up>&, Args&&...> |
| constexpr | Variant (std::in_place_index_t< I >, std::initializer_list< Up > il, Args &&... args) |
| | constructs a variant with the alternative T specified by the index I.
|
| |
| | ~Variant ()=default |
| | destroy the Variant instance.
|
| |
| | ~Variant () |
| | destroy the Variant instance.
|
| |
| constexpr Variant & | operator= (const Variant &other)=default |
| | copy assignment.
|
| |
| constexpr Variant & | operator= (const Variant &other) |
| | copy assignment.
|
| |
| constexpr Variant & | operator= (Variant &&other)=default |
| | move assignment.
|
| |
| constexpr Variant & | operator= (Variant &&other) noexcept |
| | move assignment.
|
| |
template<typename T , typename Match = match_t<T&&, Ts...>>
requires is_unique_v<Match, Ts...> && std::is_constructible_v<Match, T&&> |
| constexpr Variant & | operator= (T &&t) |
| | assign a Variant holding the alternative selected by overload resolution.
|
| |
template<typename T >
requires is_unique_v<T, Ts...> |
| constexpr bool | is () const |
| | check that the member type in use is the same than the one specified.
|
| |
template<std::size_t I>
requires (I < sizeof...(Ts)) |
| constexpr bool | is () const |
| | check that the index in use is the same than the one specified.
|
| |
template<typename T , typename... Args>
requires is_unique_v<T, Ts...> && std::is_constructible_v<T, Args&&...> |
| constexpr 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>
requires is_unique_v<T, Ts...> && std::is_constructible_v<T, std::initializer_list<Up>&, Args&&...> |
| constexpr 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>
requires std::is_constructible_v<std::tuple_element_t<I, std::tuple<Ts...>>, Args&&...> |
| constexpr std::tuple_element_t< I, std::tuple< 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>
requires std::is_constructible_v<std::tuple_element_t<I, std::tuple<Ts...>>, std::initializer_list<Up>&, Args&&...> |
| constexpr std::tuple_element_t< I, std::tuple< 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 >
requires is_unique_v<T, Ts...> |
| constexpr T & | get () |
| | get the variable value of the object type identified by type.
|
| |
template<typename T >
requires is_unique_v<T, Ts...> |
| constexpr const T & | get () const |
| | get the variable value of the object type identified by type.
|
| |
template<std::size_t I>
requires (I < sizeof...(Ts)) |
| constexpr std::tuple_element_t< I, std::tuple< Ts... > > & | get () |
| | get the variable value of the object type identified by index.
|
| |
template<std::size_t I>
requires (I < sizeof...(Ts)) |
| constexpr const std::tuple_element_t< I, std::tuple< Ts... > > & | get () const |
| | get the variable value of the object type identified by index.
|
| |
template<typename T >
requires is_unique_v<T, Ts...> |
| constexpr T * | getIf () |
| | get the variable value address of the object type identified by type.
|
| |
template<typename T >
requires is_unique_v<T, Ts...> |
| constexpr const T * | getIf () const |
| | get the variable value address of the object type identified by type.
|
| |
template<std::size_t I>
requires (I < sizeof...(Ts)) |
| constexpr std::tuple_element_t< I, std::tuple< Ts... > > * | getIf () |
| | get the variable value address of the object type identified by index.
|
| |
template<std::size_t I>
requires (I < sizeof...(Ts)) |
| constexpr const std::tuple_element_t< I, std::tuple< 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.
|
| |
| void | swap (Variant &other) noexcept |
| | swap this variant with another.
|
| |
template<typename... Ts>
class join::Variant< Ts >
variant class.