[libcxx-commits] [libcxx] [libc++] Accept __VA_ARGS__ in conditional _NOEXCEPT_ macro (PR #79877)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Jan 29 10:19:48 PST 2024
https://github.com/ldionne created https://github.com/llvm/llvm-project/pull/79877
This prevents having to use double parentheses in common cases.
>From cf1fba6d670dfff0ff06f5e6ebcd02646aee6e64 Mon Sep 17 00:00:00 2001
From: Louis Dionne <ldionne.2 at gmail.com>
Date: Mon, 29 Jan 2024 13:18:46 -0500
Subject: [PATCH] [libc++] Accept __VA_ARGS__ in conditional _NOEXCEPT_ macro
This prevents having to use double parentheses in common cases.
---
libcxx/include/__config | 4 ++--
libcxx/include/__utility/pair.h | 31 +++++++++++++-----------------
libcxx/include/string | 4 ++--
libcxx/include/tuple | 34 ++++++++++++++++-----------------
libcxx/include/vector | 8 ++++----
5 files changed, 38 insertions(+), 43 deletions(-)
diff --git a/libcxx/include/__config b/libcxx/include/__config
index 9fc608ee14320dc..78a7f0917184eb1 100644
--- a/libcxx/include/__config
+++ b/libcxx/include/__config
@@ -618,7 +618,7 @@ _LIBCPP_HARDENING_MODE_DEBUG
# define _ALIGNAS(x) alignas(x)
# define _LIBCPP_NORETURN [[noreturn]]
# define _NOEXCEPT noexcept
-# define _NOEXCEPT_(x) noexcept(x)
+# define _NOEXCEPT_(...) noexcept(__VA_ARGS__)
# define _LIBCPP_CONSTEXPR constexpr
# else
@@ -630,7 +630,7 @@ _LIBCPP_HARDENING_MODE_DEBUG
# define _LIBCPP_HAS_NO_NOEXCEPT
# define nullptr __nullptr
# define _NOEXCEPT throw()
-# define _NOEXCEPT_(x)
+# define _NOEXCEPT_(...)
# define static_assert(...) _Static_assert(__VA_ARGS__)
# define decltype(...) __decltype(__VA_ARGS__)
# define _LIBCPP_CONSTEXPR
diff --git a/libcxx/include/__utility/pair.h b/libcxx/include/__utility/pair.h
index 2f4908ceddcedfd..577e23198812b47 100644
--- a/libcxx/include/__utility/pair.h
+++ b/libcxx/include/__utility/pair.h
@@ -187,8 +187,7 @@ struct _LIBCPP_TEMPLATE_VIS pair
# endif
__enable_if_t<_CheckArgs::template __enable_explicit<_U1, _U2>(), int> = 0 >
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 explicit pair(_U1&& __u1, _U2&& __u2)
- _NOEXCEPT_((is_nothrow_constructible<first_type, _U1>::value &&
- is_nothrow_constructible<second_type, _U2>::value))
+ _NOEXCEPT_(is_nothrow_constructible<first_type, _U1>::value&& is_nothrow_constructible<second_type, _U2>::value)
: first(std::forward<_U1>(__u1)), second(std::forward<_U2>(__u2)) {
}
@@ -202,8 +201,7 @@ struct _LIBCPP_TEMPLATE_VIS pair
# endif
__enable_if_t<_CheckArgs::template __enable_implicit<_U1, _U2>(), int> = 0 >
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair(_U1&& __u1, _U2&& __u2)
- _NOEXCEPT_((is_nothrow_constructible<first_type, _U1>::value &&
- is_nothrow_constructible<second_type, _U2>::value))
+ _NOEXCEPT_(is_nothrow_constructible<first_type, _U1>::value&& is_nothrow_constructible<second_type, _U2>::value)
: first(std::forward<_U1>(__u1)), second(std::forward<_U2>(__u2)) {
}
@@ -221,28 +219,26 @@ struct _LIBCPP_TEMPLATE_VIS pair
class _U2,
__enable_if_t<_CheckArgs::template __enable_explicit<_U1 const&, _U2 const&>(), int> = 0>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 explicit pair(pair<_U1, _U2> const& __p)
- _NOEXCEPT_((is_nothrow_constructible<first_type, _U1 const&>::value &&
- is_nothrow_constructible<second_type, _U2 const&>::value))
+ _NOEXCEPT_(is_nothrow_constructible<first_type, _U1 const&>::value&&
+ is_nothrow_constructible<second_type, _U2 const&>::value)
: first(__p.first), second(__p.second) {}
template <class _U1,
class _U2,
__enable_if_t<_CheckArgs::template __enable_implicit<_U1 const&, _U2 const&>(), int> = 0>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair(pair<_U1, _U2> const& __p)
- _NOEXCEPT_((is_nothrow_constructible<first_type, _U1 const&>::value &&
- is_nothrow_constructible<second_type, _U2 const&>::value))
+ _NOEXCEPT_(is_nothrow_constructible<first_type, _U1 const&>::value&&
+ is_nothrow_constructible<second_type, _U2 const&>::value)
: first(__p.first), second(__p.second) {}
template <class _U1, class _U2, __enable_if_t<_CheckArgs::template __enable_explicit<_U1, _U2>(), int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 explicit pair(pair<_U1, _U2>&& __p)
- _NOEXCEPT_((is_nothrow_constructible<first_type, _U1&&>::value &&
- is_nothrow_constructible<second_type, _U2&&>::value))
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 explicit pair(pair<_U1, _U2>&& __p) _NOEXCEPT_(
+ is_nothrow_constructible<first_type, _U1&&>::value&& is_nothrow_constructible<second_type, _U2&&>::value)
: first(std::forward<_U1>(__p.first)), second(std::forward<_U2>(__p.second)) {}
template <class _U1, class _U2, __enable_if_t<_CheckArgs::template __enable_implicit<_U1, _U2>(), int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair(pair<_U1, _U2>&& __p)
- _NOEXCEPT_((is_nothrow_constructible<first_type, _U1&&>::value &&
- is_nothrow_constructible<second_type, _U2&&>::value))
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair(pair<_U1, _U2>&& __p) _NOEXCEPT_(
+ is_nothrow_constructible<first_type, _U1&&>::value&& is_nothrow_constructible<second_type, _U2&&>::value)
: first(std::forward<_U1>(__p.first)), second(std::forward<_U2>(__p.second)) {}
# if _LIBCPP_STD_VER >= 23
@@ -276,9 +272,8 @@ struct _LIBCPP_TEMPLATE_VIS pair
template <class... _Args1, class... _Args2>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
- pair(piecewise_construct_t __pc, tuple<_Args1...> __first_args, tuple<_Args2...> __second_args)
- _NOEXCEPT_((is_nothrow_constructible<first_type, _Args1...>::value &&
- is_nothrow_constructible<second_type, _Args2...>::value))
+ pair(piecewise_construct_t __pc, tuple<_Args1...> __first_args, tuple<_Args2...> __second_args) _NOEXCEPT_(
+ is_nothrow_constructible<first_type, _Args1...>::value&& is_nothrow_constructible<second_type, _Args2...>::value)
: pair(__pc,
__first_args,
__second_args,
@@ -580,7 +575,7 @@ struct common_type<pair<_T1, _T2>, pair<_U1, _U2>> {
template <class _T1, class _T2, __enable_if_t<__is_swappable<_T1>::value && __is_swappable<_T2>::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void swap(pair<_T1, _T2>& __x, pair<_T1, _T2>& __y)
- _NOEXCEPT_((__is_nothrow_swappable<_T1>::value && __is_nothrow_swappable<_T2>::value)) {
+ _NOEXCEPT_(__is_nothrow_swappable<_T1>::value&& __is_nothrow_swappable<_T2>::value) {
__x.swap(__y);
}
diff --git a/libcxx/include/string b/libcxx/include/string
index c5c245fa297d353..e3528db2a374253 100644
--- a/libcxx/include/string
+++ b/libcxx/include/string
@@ -1123,7 +1123,7 @@ public:
#ifndef _LIBCPP_CXX03_LANG
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& operator=(basic_string&& __str)
- _NOEXCEPT_((__noexcept_move_assign_container<_Allocator, __alloc_traits>::value)) {
+ _NOEXCEPT_(__noexcept_move_assign_container<_Allocator, __alloc_traits>::value) {
__move_assign(__str, integral_constant<bool, __alloc_traits::propagate_on_container_move_assignment::value>());
return *this;
}
@@ -1380,7 +1380,7 @@ public:
}
#ifndef _LIBCPP_CXX03_LANG
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& assign(basic_string&& __str)
- _NOEXCEPT_((__noexcept_move_assign_container<_Allocator, __alloc_traits>::value)) {
+ _NOEXCEPT_(__noexcept_move_assign_container<_Allocator, __alloc_traits>::value) {
*this = std::move(__str);
return *this;
}
diff --git a/libcxx/include/tuple b/libcxx/include/tuple
index 0e5f0b4831b41e7..c41e9242a5a870b 100644
--- a/libcxx/include/tuple
+++ b/libcxx/include/tuple
@@ -341,7 +341,7 @@ public:
class = __enable_if_t<
_And< _IsNotSame<__remove_cvref_t<_Tp>, __tuple_leaf>, is_constructible<_Hp, _Tp> >::value > >
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 explicit __tuple_leaf(_Tp&& __t)
- _NOEXCEPT_((is_nothrow_constructible<_Hp, _Tp>::value))
+ _NOEXCEPT_(is_nothrow_constructible<_Hp, _Tp>::value)
: __value_(std::forward<_Tp>(__t)) {
static_assert(__can_bind_reference<_Tp&&>(),
"Attempted construction of reference element binds to a temporary whose lifetime has ended");
@@ -409,7 +409,7 @@ public:
class = __enable_if_t<
_And< _IsNotSame<__remove_cvref_t<_Tp>, __tuple_leaf>, is_constructible<_Hp, _Tp> >::value > >
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 explicit __tuple_leaf(_Tp&& __t)
- _NOEXCEPT_((is_nothrow_constructible<_Hp, _Tp>::value))
+ _NOEXCEPT_(is_nothrow_constructible<_Hp, _Tp>::value)
: _Hp(std::forward<_Tp>(__t)) {}
template <class _Tp, class _Alloc>
@@ -468,8 +468,8 @@ struct _LIBCPP_DECLSPEC_EMPTY_BASES __tuple_impl<__tuple_indices<_Indx...>, _Tp.
template <size_t... _Uf, class... _Tf, size_t... _Ul, class... _Tl, class... _Up>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 explicit __tuple_impl(
__tuple_indices<_Uf...>, __tuple_types<_Tf...>, __tuple_indices<_Ul...>, __tuple_types<_Tl...>, _Up&&... __u)
- _NOEXCEPT_((__all<is_nothrow_constructible<_Tf, _Up>::value...>::value &&
- __all<is_nothrow_default_constructible<_Tl>::value...>::value))
+ _NOEXCEPT_(__all<is_nothrow_constructible<_Tf, _Up>::value...>::value&&
+ __all<is_nothrow_default_constructible<_Tl>::value...>::value)
: __tuple_leaf<_Uf, _Tf>(std::forward<_Up>(__u))..., __tuple_leaf<_Ul, _Tl>()... {}
template <class _Alloc, size_t... _Uf, class... _Tf, size_t... _Ul, class... _Tl, class... _Up>
@@ -616,7 +616,7 @@ public:
__enable_if_t< _And< _BoolConstant<sizeof...(_Up) == sizeof...(_Tp)>, _EnableUTypesCtor<_Up...> >::value,
int> = 0>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 explicit(_Not<_Lazy<_And, is_convertible<_Up, _Tp>...> >::value)
- tuple(_Up&&... __u) _NOEXCEPT_((_And<is_nothrow_constructible<_Tp, _Up>...>::value))
+ tuple(_Up&&... __u) _NOEXCEPT_(_And<is_nothrow_constructible<_Tp, _Up>...>::value)
: __base_(typename __make_tuple_indices<sizeof...(_Up)>::type(),
typename __make_tuple_types<tuple, sizeof...(_Up)>::type(),
typename __make_tuple_indices<sizeof...(_Tp), sizeof...(_Up)>::type(),
@@ -683,7 +683,7 @@ public:
template <class... _Up, __enable_if_t< _And< _EnableCtorFromUTypesTuple<const tuple<_Up...>&> >::value, int> = 0>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 explicit(
_Not<_Lazy<_And, is_convertible<const _Up&, _Tp>...> >::value) tuple(const tuple<_Up...>& __t)
- _NOEXCEPT_((_And<is_nothrow_constructible<_Tp, const _Up&>...>::value))
+ _NOEXCEPT_(_And<is_nothrow_constructible<_Tp, const _Up&>...>::value)
: __base_(__t) {}
template <class... _Up,
@@ -710,7 +710,7 @@ public:
// tuple(tuple<U...>&&) constructors (including allocator_arg_t variants)
template <class... _Up, __enable_if_t< _And< _EnableCtorFromUTypesTuple<tuple<_Up...>&&> >::value, int> = 0>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 explicit(_Not<_Lazy<_And, is_convertible<_Up, _Tp>...> >::value)
- tuple(tuple<_Up...>&& __t) _NOEXCEPT_((_And<is_nothrow_constructible<_Tp, _Up>...>::value))
+ tuple(tuple<_Up...>&& __t) _NOEXCEPT_(_And<is_nothrow_constructible<_Tp, _Up>...>::value)
: __base_(std::move(__t)) {}
template <class _Alloc,
@@ -767,7 +767,7 @@ public:
__enable_if_t< _And< _EnableCtorFromPair<const pair<_Up1, _Up2>&> >::value, int> = 0>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 explicit(
_Not<_BothImplicitlyConvertible<const pair<_Up1, _Up2>&> >::value) tuple(const pair<_Up1, _Up2>& __p)
- _NOEXCEPT_((_NothrowConstructibleFromPair<const pair<_Up1, _Up2>&>::value))
+ _NOEXCEPT_(_NothrowConstructibleFromPair<const pair<_Up1, _Up2>&>::value)
: __base_(__p) {}
template <class _Alloc,
@@ -805,7 +805,7 @@ public:
__enable_if_t< _And< _EnableCtorFromPair<pair<_Up1, _Up2>&&> >::value, int> = 0>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 explicit(
_Not<_BothImplicitlyConvertible<pair<_Up1, _Up2>&&> >::value) tuple(pair<_Up1, _Up2>&& __p)
- _NOEXCEPT_((_NothrowConstructibleFromPair<pair<_Up1, _Up2>&&>::value))
+ _NOEXCEPT_(_NothrowConstructibleFromPair<pair<_Up1, _Up2>&&>::value)
: __base_(std::move(__p)) {}
template <class _Alloc,
@@ -840,7 +840,7 @@ public:
// [tuple.assign]
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 tuple&
operator=(_If<_And<is_copy_assignable<_Tp>...>::value, tuple, __nat> const& __tuple)
- _NOEXCEPT_((_And<is_nothrow_copy_assignable<_Tp>...>::value)) {
+ _NOEXCEPT_(_And<is_nothrow_copy_assignable<_Tp>...>::value) {
std::__memberwise_copy_assign(*this, __tuple, typename __make_tuple_indices<sizeof...(_Tp)>::type());
return *this;
}
@@ -864,7 +864,7 @@ public:
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 tuple&
operator=(_If<_And<is_move_assignable<_Tp>...>::value, tuple, __nat>&& __tuple)
- _NOEXCEPT_((_And<is_nothrow_move_assignable<_Tp>...>::value)) {
+ _NOEXCEPT_(_And<is_nothrow_move_assignable<_Tp>...>::value) {
std::__memberwise_forward_assign(
*this, std::move(__tuple), __tuple_types<_Tp...>(), typename __make_tuple_indices<sizeof...(_Tp)>::type());
return *this;
@@ -875,7 +875,7 @@ public:
__enable_if_t< _And< _BoolConstant<sizeof...(_Tp) == sizeof...(_Up)>, is_assignable<_Tp&, _Up const&>... >::value,
int> = 0>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 tuple& operator=(tuple<_Up...> const& __tuple)
- _NOEXCEPT_((_And<is_nothrow_assignable<_Tp&, _Up const&>...>::value)) {
+ _NOEXCEPT_(_And<is_nothrow_assignable<_Tp&, _Up const&>...>::value) {
std::__memberwise_copy_assign(*this, __tuple, typename __make_tuple_indices<sizeof...(_Tp)>::type());
return *this;
}
@@ -884,7 +884,7 @@ public:
__enable_if_t< _And< _BoolConstant<sizeof...(_Tp) == sizeof...(_Up)>, is_assignable<_Tp&, _Up>... >::value,
int> = 0>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 tuple& operator=(tuple<_Up...>&& __tuple)
- _NOEXCEPT_((_And<is_nothrow_assignable<_Tp&, _Up>...>::value)) {
+ _NOEXCEPT_(_And<is_nothrow_assignable<_Tp&, _Up>...>::value) {
std::__memberwise_forward_assign(
*this, std::move(__tuple), __tuple_types<_Up...>(), typename __make_tuple_indices<sizeof...(_Tp)>::type());
return *this;
@@ -949,7 +949,7 @@ public:
class _Up2,
__enable_if_t< _EnableAssignFromPair<false, pair<_Up1, _Up2> const&>::value, int> = 0>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 tuple& operator=(pair<_Up1, _Up2> const& __pair)
- _NOEXCEPT_((_NothrowAssignFromPair<false, pair<_Up1, _Up2> const&>::value)) {
+ _NOEXCEPT_(_NothrowAssignFromPair<false, pair<_Up1, _Up2> const&>::value) {
std::get<0>(*this) = __pair.first;
std::get<1>(*this) = __pair.second;
return *this;
@@ -957,7 +957,7 @@ public:
template <class _Up1, class _Up2, __enable_if_t< _EnableAssignFromPair<false, pair<_Up1, _Up2>&&>::value, int> = 0>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 tuple& operator=(pair<_Up1, _Up2>&& __pair)
- _NOEXCEPT_((_NothrowAssignFromPair<false, pair<_Up1, _Up2>&&>::value)) {
+ _NOEXCEPT_(_NothrowAssignFromPair<false, pair<_Up1, _Up2>&&>::value) {
std::get<0>(*this) = std::forward<_Up1>(__pair.first);
std::get<1>(*this) = std::forward<_Up2>(__pair.second);
return *this;
@@ -969,7 +969,7 @@ public:
size_t _Np,
class = __enable_if_t< _And< _BoolConstant<_Np == sizeof...(_Tp)>, is_assignable<_Tp&, _Up const&>... >::value > >
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 tuple& operator=(array<_Up, _Np> const& __array)
- _NOEXCEPT_((_And<is_nothrow_assignable<_Tp&, _Up const&>...>::value)) {
+ _NOEXCEPT_(_And<is_nothrow_assignable<_Tp&, _Up const&>...>::value) {
std::__memberwise_copy_assign(*this, __array, typename __make_tuple_indices<sizeof...(_Tp)>::type());
return *this;
}
@@ -980,7 +980,7 @@ public:
class = void,
class = __enable_if_t< _And< _BoolConstant<_Np == sizeof...(_Tp)>, is_assignable<_Tp&, _Up>... >::value > >
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 tuple& operator=(array<_Up, _Np>&& __array)
- _NOEXCEPT_((_And<is_nothrow_assignable<_Tp&, _Up>...>::value)) {
+ _NOEXCEPT_(_And<is_nothrow_assignable<_Tp&, _Up>...>::value) {
std::__memberwise_forward_assign(
*this,
std::move(__array),
diff --git a/libcxx/include/vector b/libcxx/include/vector
index e9dd57055cb112d..f24d2c4b9c6ac05 100644
--- a/libcxx/include/vector
+++ b/libcxx/include/vector
@@ -527,7 +527,7 @@ public:
_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
vector(vector&& __x, const __type_identity_t<allocator_type>& __a);
_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI vector& operator=(vector&& __x)
- _NOEXCEPT_((__noexcept_move_assign_container<_Allocator, __alloc_traits>::value));
+ _NOEXCEPT_(__noexcept_move_assign_container<_Allocator, __alloc_traits>::value);
template <class _InputIterator,
__enable_if_t<__has_exactly_input_iterator_category<_InputIterator>::value &&
@@ -1263,7 +1263,7 @@ vector<_Tp, _Allocator>::vector(initializer_list<value_type> __il, const allocat
template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20 inline _LIBCPP_HIDE_FROM_ABI vector<_Tp, _Allocator>&
vector<_Tp, _Allocator>::operator=(vector&& __x)
- _NOEXCEPT_((__noexcept_move_assign_container<_Allocator, __alloc_traits>::value)) {
+ _NOEXCEPT_(__noexcept_move_assign_container<_Allocator, __alloc_traits>::value) {
__move_assign(__x, integral_constant<bool, __alloc_traits::propagate_on_container_move_assignment::value>());
return *this;
}
@@ -1952,7 +1952,7 @@ public:
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
vector(vector&& __v, const __type_identity_t<allocator_type>& __a);
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 vector& operator=(vector&& __v)
- _NOEXCEPT_((__noexcept_move_assign_container<_Allocator, __alloc_traits>::value));
+ _NOEXCEPT_(__noexcept_move_assign_container<_Allocator, __alloc_traits>::value);
template <class _InputIterator, __enable_if_t<__has_exactly_input_iterator_category<_InputIterator>::value, int> = 0>
void _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 assign(_InputIterator __first, _InputIterator __last);
@@ -2499,7 +2499,7 @@ vector<bool, _Allocator>::vector(vector&& __v, const __type_identity_t<allocator
template <class _Allocator>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 vector<bool, _Allocator>&
vector<bool, _Allocator>::operator=(vector&& __v)
- _NOEXCEPT_((__noexcept_move_assign_container<_Allocator, __alloc_traits>::value)) {
+ _NOEXCEPT_(__noexcept_move_assign_container<_Allocator, __alloc_traits>::value) {
__move_assign(__v, integral_constant<bool, __storage_traits::propagate_on_container_move_assignment::value>());
return *this;
}
More information about the libcxx-commits
mailing list