}
_Variant_base(_Variant_base&& __rhs)
- noexcept(__and_<is_nothrow_move_constructible<_Types>...>::value)
+ noexcept((is_nothrow_move_constructible_v<_Types> && ...))
{
if (__rhs._M_valid())
{
_Variant_base&
operator=(_Variant_base&& __rhs)
- noexcept(__and_<is_nothrow_move_constructible<_Types>...,
- is_nothrow_move_assignable<_Types>...>::value)
+ noexcept((is_nothrow_move_constructible_v<_Types> && ...)
+ && (is_nothrow_move_assignable_v<_Types> && ...))
{
if (this->_M_index == __rhs._M_index)
{
{ __lhs.swap(__rhs); }
template<typename... _Types>
- enable_if_t<!__and_<is_move_constructible<_Types>...,
- is_swappable<_Types>...>::value>
+ enable_if_t<!((is_move_constructible_v<_Types> && ...)
+ && (is_swappable_v<_Types> && ...))>
swap(variant<_Types...>&, variant<_Types...>&) = delete;
class bad_variant_access : public exception
is_default_constructible_v<
variant_alternative_t<0, variant<_Types...>>>, variant<_Types...>>,
private _Enable_copy_move<
- __and_<is_copy_constructible<_Types>...>::value,
- __and_<is_copy_constructible<_Types>...,
- is_move_constructible<_Types>...,
- is_copy_assignable<_Types>...>::value,
- __and_<is_move_constructible<_Types>...>::value,
- __and_<is_move_constructible<_Types>...,
- is_move_assignable<_Types>...>::value,
+ (is_copy_constructible_v<_Types> && ...),
+ (is_copy_constructible_v<_Types> && ...)
+ && (is_move_constructible_v<_Types> && ...)
+ && (is_copy_assignable_v<_Types> && ...),
+ (is_move_constructible_v<_Types> && ...),
+ (is_move_constructible_v<_Types> && ...)
+ && (is_move_assignable_v<_Types> && ...),
variant<_Types...>>
{
private:
noexcept(is_nothrow_default_constructible_v<__to_type<0>>) = default;
variant(const variant&) = default;
variant(variant&&)
- noexcept(__and_<
- is_nothrow_move_constructible<_Types>...>::value) = default;
+ noexcept((is_nothrow_move_constructible_v<_Types> && ...)) = default;
template<typename _Tp,
typename = enable_if_t<__exactly_once<__accepted_type<_Tp&&>>
variant& operator=(const variant&) = default;
variant& operator=(variant&&)
- noexcept(__and_<is_nothrow_move_constructible<_Types>...,
- is_nothrow_move_assignable<_Types>...>::value) = default;
+ noexcept((is_nothrow_move_constructible_v<_Types> && ...)
+ && (is_nothrow_move_assignable_v<_Types> && ...)) = default;
template<typename _Tp>
enable_if_t<__exactly_once<__accepted_type<_Tp&&>>
void
swap(variant& __rhs)
- noexcept(__and_<__is_nothrow_swappable<_Types>...>::value
+ noexcept((__is_nothrow_swappable<_Types>::value && ...)
&& is_nothrow_move_constructible_v<variant>)
{
if (this->index() == __rhs.index())