@@ -51,8 +51,8 @@ public:
51
51
vector& operator=(const vector& x);
52
52
vector& operator=(vector&& x)
53
53
noexcept(
54
- allocator_type::propagate_on_container_move_assignment::value &&
55
- is_nothrow_move_assignable< allocator_type>:: value);
54
+ allocator_type::propagate_on_container_move_assignment::value ||
55
+ allocator_type::is_always_equal:: value); // C++17
56
56
vector& operator=(initializer_list<value_type> il);
57
57
template <class InputIterator>
58
58
void assign(InputIterator first, InputIterator last);
@@ -175,8 +175,8 @@ public:
175
175
vector& operator=(const vector& x);
176
176
vector& operator=(vector&& x)
177
177
noexcept(
178
- allocator_type::propagate_on_container_move_assignment::value &&
179
- is_nothrow_move_assignable< allocator_type>:: value);
178
+ allocator_type::propagate_on_container_move_assignment::value ||
179
+ allocator_type::is_always_equal:: value); // C++17
180
180
vector& operator=(initializer_list<value_type> il);
181
181
template <class InputIterator>
182
182
void assign(InputIterator first, InputIterator last);
@@ -562,9 +562,7 @@ public:
562
562
vector (vector&& __x, const allocator_type& __a);
563
563
_LIBCPP_INLINE_VISIBILITY
564
564
vector& operator =(vector&& __x)
565
- _NOEXCEPT_ (
566
- __alloc_traits::propagate_on_container_move_assignment::value &&
567
- is_nothrow_move_assignable<allocator_type>::value);
565
+ _NOEXCEPT_ ((__noexcept_move_assign_container<_Allocator, __alloc_traits>::value));
568
566
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
569
567
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
570
568
_LIBCPP_INLINE_VISIBILITY
@@ -787,7 +785,8 @@ private:
787
785
void __move_range (pointer __from_s, pointer __from_e, pointer __to);
788
786
void __move_assign (vector& __c, true_type)
789
787
_NOEXCEPT_(is_nothrow_move_assignable<allocator_type>::value);
790
- void __move_assign (vector& __c, false_type);
788
+ void __move_assign (vector& __c, false_type)
789
+ _NOEXCEPT_(__alloc_traits::is_always_equal::value);
791
790
_LIBCPP_INLINE_VISIBILITY
792
791
void __destruct_at_end (pointer __new_last) _NOEXCEPT
793
792
{
@@ -1303,9 +1302,7 @@ template <class _Tp, class _Allocator>
1303
1302
inline _LIBCPP_INLINE_VISIBILITY
1304
1303
vector<_Tp, _Allocator>&
1305
1304
vector<_Tp, _Allocator>::operator =(vector&& __x)
1306
- _NOEXCEPT_ (
1307
- __alloc_traits::propagate_on_container_move_assignment::value &&
1308
- is_nothrow_move_assignable<allocator_type>::value)
1305
+ _NOEXCEPT_ ((__noexcept_move_assign_container<_Allocator, __alloc_traits>::value))
1309
1306
{
1310
1307
__move_assign (__x, integral_constant<bool ,
1311
1308
__alloc_traits::propagate_on_container_move_assignment::value>());
@@ -1315,6 +1312,7 @@ vector<_Tp, _Allocator>::operator=(vector&& __x)
1315
1312
template <class _Tp , class _Allocator >
1316
1313
void
1317
1314
vector<_Tp, _Allocator>::__move_assign(vector& __c, false_type)
1315
+ _NOEXCEPT_ (__alloc_traits::is_always_equal::value)
1318
1316
{
1319
1317
if (__base::__alloc () != __c.__alloc ())
1320
1318
{
@@ -2213,9 +2211,7 @@ public:
2213
2211
vector (vector&& __v, const allocator_type& __a);
2214
2212
_LIBCPP_INLINE_VISIBILITY
2215
2213
vector& operator =(vector&& __v)
2216
- _NOEXCEPT_ (
2217
- __alloc_traits::propagate_on_container_move_assignment::value &&
2218
- is_nothrow_move_assignable<allocator_type>::value);
2214
+ _NOEXCEPT_ ((__noexcept_move_assign_container<_Allocator, __alloc_traits>::value));
2219
2215
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
2220
2216
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
2221
2217
_LIBCPP_INLINE_VISIBILITY
@@ -2838,9 +2834,7 @@ template <class _Allocator>
2838
2834
inline _LIBCPP_INLINE_VISIBILITY
2839
2835
vector<bool , _Allocator>&
2840
2836
vector<bool , _Allocator>::operator =(vector&& __v)
2841
- _NOEXCEPT_ (
2842
- __alloc_traits::propagate_on_container_move_assignment::value &&
2843
- is_nothrow_move_assignable<allocator_type>::value)
2837
+ _NOEXCEPT_ ((__noexcept_move_assign_container<_Allocator, __alloc_traits>::value))
2844
2838
{
2845
2839
__move_assign (__v, integral_constant<bool ,
2846
2840
__storage_traits::propagate_on_container_move_assignment::value>());
0 commit comments