|
| variant (const variant &)=default |
|
| variant (variant &&)=default |
|
template<class T , enable_if_t<!is_same< remove_cvref_t< T >, variant >::value, int > = 0, enable_if_t<!is_same< remove_cvref_t< T >, in_place_type_t< remove_cvref_t< T >>>::value, int > = 0, enable_if_t<!is_same< remove_cvref_t< T >, Internal::is_in_place_index_t< remove_cvref_t< T >>>::value, int > = 0, enable_if_t< variant_size< variant >::value !=0, int > = 0, class Alternative = variant_detail::best_alternative_t<T, Types...>, size_t Index = find_type::find_exactly_one_alternative_v<Alternative, Types...>, enable_if_t< is_constructible< Alternative, T >::value, int > = 0> |
constexpr | variant (T &&arg) |
|
template<class T , class... Args, size_t Index = find_type::find_exactly_one_alternative_v<T, Types...>, enable_if_t< is_constructible< T, Args... >::value, int > = 0> |
constexpr | variant (in_place_type_t< T >, Args &&... args) |
|
template<class T , class U , class... Args, size_t Index = find_type::find_exactly_one_alternative_v<T, Types...>, enable_if_t< is_constructible< T, std::initializer_list< U > &, Args... >::value, int > = 0> |
constexpr | variant (in_place_type_t< T >, std::initializer_list< U > il, Args &&... args) |
|
template<size_t Index, class... Args, class = enable_if_t<(Index < variant_size_v<variant>), int>, class Alternative = variant_alternative_t<Index, variant>, enable_if_t< is_constructible< Alternative, Args... >::value, int > = 0> |
constexpr | variant (in_place_index_t< Index >, Args &&... args) |
|
template<size_t Index, class U , class... Args, enable_if_t<(Index< variant_size< variant >::value), int > = 0, class Alternative = variant_alternative_t<Index, variant>, enable_if_t< is_constructible< Alternative, std::initializer_list< U > &, Args... >::value, int > = 0> |
constexpr | variant (in_place_index_t< Index >, std::initializer_list< U > il, Args &&... args) |
|
constexpr variant & | operator= (const variant &)=default |
|
constexpr variant & | operator= (variant &&)=default |
|
template<class T , enable_if_t<!is_same< remove_cvref_t< T >, variant >::value, int > = 0, class Alternative = variant_detail::best_alternative_t<T, Types...>, size_t Index = find_type::find_exactly_one_alternative_v<Alternative, Types...>, enable_if_t< is_assignable< Alternative &, T >::value &&is_constructible< Alternative, T >::value, int > = 0> |
constexpr auto | operator= (T &&arg) -> variant & |
|
template<class T , class... Args, size_t Index = find_type::find_exactly_one_alternative_v<T, Types...>, enable_if_t< is_constructible< T, Args... >::value, int > = 0> |
constexpr T & | emplace (Args &&... args) |
|
template<class T , class U , class... Args, size_t Index = find_type::find_exactly_one_alternative_v<T, Types...>, enable_if_t< is_constructible< T, std::initializer_list< U > &, Args... >::value, int > = 0> |
constexpr T & | emplace (std::initializer_list< U > il, Args &&... args) |
|
template<size_t Index, class... Args, enable_if_t<(Index< variant_size< variant >::value), int > = 0, class Alternative = variant_alternative_t<Index, variant>, enable_if_t< is_constructible< Alternative, Args... >::value, int > = 0> |
constexpr Alternative & | emplace (Args &&... args) |
|
template<size_t Index, class U , class... Args, enable_if_t<(Index< variant_size< variant >::value), int > = 0, class Alternative = variant_alternative_t<Index, variant>, enable_if_t< is_constructible< Alternative, std::initializer_list< U > &, Args... >::value, int > = 0> |
constexpr Alternative & | emplace (std::initializer_list< U > il, Args &&... args) |
|
constexpr bool | valueless_by_exception () const |
| Returns false if and only if the variant holds a value.
|
|
constexpr size_t | index () const |
|
template<bool Placeholder = true, enable_if_t< conjunction< bool_constant< Placeholder &&is_swappable< Types >::value &&is_move_constructible< Types >::value >... >::value, bool > = false> |
constexpr void | swap (variant &other) |
| Overloads the std::swap algorithm for std::variant. Effectively calls lhs.swap(rhs).
|
|