diff --git a/libcxx/include/__algorithm/iter_swap.h b/libcxx/include/__algorithm/iter_swap.h --- a/libcxx/include/__algorithm/iter_swap.h +++ b/libcxx/include/__algorithm/iter_swap.h @@ -22,8 +22,7 @@ template inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 void iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b) - // _NOEXCEPT_(_NOEXCEPT_(swap(*__a, *__b))) - _NOEXCEPT_(_NOEXCEPT_(swap(*declval<_ForwardIterator1>(), *declval<_ForwardIterator2>()))) { + _NOEXCEPT_(noexcept(swap(*declval<_ForwardIterator1>(), *declval<_ForwardIterator2>()))) { swap(*__a, *__b); } diff --git a/libcxx/include/__functional/function.h b/libcxx/include/__functional/function.h --- a/libcxx/include/__functional/function.h +++ b/libcxx/include/__functional/function.h @@ -201,7 +201,7 @@ } _LIBCPP_INLINE_VISIBILITY - void destroy() _NOEXCEPT { __f_.~__compressed_pair<_Target, _Alloc>(); } + void destroy() noexcept { __f_.~__compressed_pair<_Target, _Alloc>(); } static void __destroy_and_delete(__alloc_func* __f) { typedef allocator_traits<_Alloc> __alloc_traits; @@ -246,7 +246,7 @@ } _LIBCPP_INLINE_VISIBILITY - void destroy() _NOEXCEPT { __f_.~_Target(); } + void destroy() noexcept { __f_.~_Target(); } static void __destroy_and_delete(__default_alloc_func* __f) { __f->destroy(); @@ -268,12 +268,12 @@ _LIBCPP_INLINE_VISIBILITY virtual ~__base() {} virtual __base* __clone() const = 0; virtual void __clone(__base*) const = 0; - virtual void destroy() _NOEXCEPT = 0; - virtual void destroy_deallocate() _NOEXCEPT = 0; + virtual void destroy() noexcept = 0; + virtual void destroy_deallocate() noexcept = 0; virtual _Rp operator()(_ArgTypes&& ...) = 0; #ifndef _LIBCPP_NO_RTTI - virtual const void* target(const type_info&) const _NOEXCEPT = 0; - virtual const std::type_info& target_type() const _NOEXCEPT = 0; + virtual const void* target(const type_info&) const noexcept = 0; + virtual const std::type_info& target_type() const noexcept = 0; #endif // _LIBCPP_NO_RTTI }; @@ -305,12 +305,12 @@ virtual __base<_Rp(_ArgTypes...)>* __clone() const; virtual void __clone(__base<_Rp(_ArgTypes...)>*) const; - virtual void destroy() _NOEXCEPT; - virtual void destroy_deallocate() _NOEXCEPT; + virtual void destroy() noexcept; + virtual void destroy_deallocate() noexcept; virtual _Rp operator()(_ArgTypes&&... __arg); #ifndef _LIBCPP_NO_RTTI - virtual const void* target(const type_info&) const _NOEXCEPT; - virtual const std::type_info& target_type() const _NOEXCEPT; + virtual const void* target(const type_info&) const noexcept; + virtual const std::type_info& target_type() const noexcept; #endif // _LIBCPP_NO_RTTI }; @@ -336,14 +336,14 @@ template void -__func<_Fp, _Alloc, _Rp(_ArgTypes...)>::destroy() _NOEXCEPT +__func<_Fp, _Alloc, _Rp(_ArgTypes...)>::destroy() noexcept { __f_.destroy(); } template void -__func<_Fp, _Alloc, _Rp(_ArgTypes...)>::destroy_deallocate() _NOEXCEPT +__func<_Fp, _Alloc, _Rp(_ArgTypes...)>::destroy_deallocate() noexcept { typedef allocator_traits<_Alloc> __alloc_traits; typedef typename __rebind_alloc_helper<__alloc_traits, __func>::type _Ap; @@ -363,7 +363,7 @@ template const void* -__func<_Fp, _Alloc, _Rp(_ArgTypes...)>::target(const type_info& __ti) const _NOEXCEPT +__func<_Fp, _Alloc, _Rp(_ArgTypes...)>::target(const type_info& __ti) const noexcept { if (__ti == typeid(_Fp)) return _VSTD::addressof(__f_.__target()); @@ -372,7 +372,7 @@ template const std::type_info& -__func<_Fp, _Alloc, _Rp(_ArgTypes...)>::target_type() const _NOEXCEPT +__func<_Fp, _Alloc, _Rp(_ArgTypes...)>::target_type() const noexcept { return typeid(_Fp); } @@ -397,7 +397,7 @@ public: _LIBCPP_INLINE_VISIBILITY - __value_func() _NOEXCEPT : __f_(nullptr) {} + __value_func() noexcept : __f_(nullptr) {} template _LIBCPP_INLINE_VISIBILITY __value_func(_Fp&& __f, const _Alloc& __a) @@ -448,7 +448,7 @@ } _LIBCPP_INLINE_VISIBILITY - __value_func(__value_func&& __f) _NOEXCEPT + __value_func(__value_func&& __f) noexcept { if (__f.__f_ == nullptr) __f_ = nullptr; @@ -513,7 +513,7 @@ } _LIBCPP_INLINE_VISIBILITY - void swap(__value_func& __f) _NOEXCEPT + void swap(__value_func& __f) noexcept { if (&__f == this) return; @@ -551,11 +551,11 @@ } _LIBCPP_INLINE_VISIBILITY - explicit operator bool() const _NOEXCEPT { return __f_ != nullptr; } + explicit operator bool() const noexcept { return __f_ != nullptr; } #ifndef _LIBCPP_NO_RTTI _LIBCPP_INLINE_VISIBILITY - const std::type_info& target_type() const _NOEXCEPT + const std::type_info& target_type() const noexcept { if (__f_ == nullptr) return typeid(void); @@ -563,7 +563,7 @@ } template - _LIBCPP_INLINE_VISIBILITY const _Tp* target() const _NOEXCEPT + _LIBCPP_INLINE_VISIBILITY const _Tp* target() const noexcept { if (__f_ == nullptr) return nullptr; @@ -858,20 +858,20 @@ } _LIBCPP_INLINE_VISIBILITY - explicit operator bool() const _NOEXCEPT + explicit operator bool() const noexcept { return !__policy_->__is_null; } #ifndef _LIBCPP_NO_RTTI _LIBCPP_INLINE_VISIBILITY - const std::type_info& target_type() const _NOEXCEPT + const std::type_info& target_type() const noexcept { return *__policy_->__type_info; } template - _LIBCPP_INLINE_VISIBILITY const _Tp* target() const _NOEXCEPT + _LIBCPP_INLINE_VISIBILITY const _Tp* target() const noexcept { if (__policy_->__is_null || typeid(_Tp) != *__policy_->__type_info) return nullptr; @@ -920,13 +920,13 @@ ::new ((void*)__p) __func(__f_); } - virtual void destroy() _NOEXCEPT { + virtual void destroy() noexcept { if (__f_) _Block_release(__f_); __f_ = 0; } - virtual void destroy_deallocate() _NOEXCEPT { + virtual void destroy_deallocate() noexcept { _LIBCPP_ASSERT(false, "Block pointers are just pointers, so they should always fit into " "std::function's small buffer optimization. This function should " @@ -938,13 +938,13 @@ } #ifndef _LIBCPP_NO_RTTI - virtual const void* target(type_info const& __ti) const _NOEXCEPT { + virtual const void* target(type_info const& __ti) const noexcept { if (__ti == typeid(__func::__block_type)) return &__f_; return (const void*)nullptr; } - virtual const std::type_info& target_type() const _NOEXCEPT { + virtual const std::type_info& target_type() const noexcept { return typeid(__func::__block_type); } #endif // _LIBCPP_NO_RTTI @@ -992,21 +992,21 @@ // construct/copy/destroy: _LIBCPP_INLINE_VISIBILITY - function() _NOEXCEPT { } + function() noexcept { } _LIBCPP_INLINE_VISIBILITY - function(nullptr_t) _NOEXCEPT {} + function(nullptr_t) noexcept {} function(const function&); - function(function&&) _NOEXCEPT; + function(function&&) noexcept; template> function(_Fp); #if _LIBCPP_STD_VER <= 14 template _LIBCPP_INLINE_VISIBILITY - function(allocator_arg_t, const _Alloc&) _NOEXCEPT {} + function(allocator_arg_t, const _Alloc&) noexcept {} template _LIBCPP_INLINE_VISIBILITY - function(allocator_arg_t, const _Alloc&, nullptr_t) _NOEXCEPT {} + function(allocator_arg_t, const _Alloc&, nullptr_t) noexcept {} template function(allocator_arg_t, const _Alloc&, const function&); template @@ -1016,15 +1016,15 @@ #endif function& operator=(const function&); - function& operator=(function&&) _NOEXCEPT; - function& operator=(nullptr_t) _NOEXCEPT; + function& operator=(function&&) noexcept; + function& operator=(nullptr_t) noexcept; template::type>> function& operator=(_Fp&&); ~function(); // function modifiers: - void swap(function&) _NOEXCEPT; + void swap(function&) noexcept; #if _LIBCPP_STD_VER <= 14 template @@ -1035,7 +1035,7 @@ // function capacity: _LIBCPP_INLINE_VISIBILITY - explicit operator bool() const _NOEXCEPT { + explicit operator bool() const noexcept { return static_cast(__f_); } @@ -1050,9 +1050,9 @@ #ifndef _LIBCPP_NO_RTTI // function target access: - const std::type_info& target_type() const _NOEXCEPT; - template _Tp* target() _NOEXCEPT; - template const _Tp* target() const _NOEXCEPT; + const std::type_info& target_type() const noexcept; + template _Tp* target() noexcept; + template const _Tp* target() const noexcept; #endif // _LIBCPP_NO_RTTI }; @@ -1114,7 +1114,7 @@ #endif template -function<_Rp(_ArgTypes...)>::function(function&& __f) _NOEXCEPT +function<_Rp(_ArgTypes...)>::function(function&& __f) noexcept : __f_(_VSTD::move(__f.__f_)) {} #if _LIBCPP_STD_VER <= 14 @@ -1147,7 +1147,7 @@ template function<_Rp(_ArgTypes...)>& -function<_Rp(_ArgTypes...)>::operator=(function&& __f) _NOEXCEPT +function<_Rp(_ArgTypes...)>::operator=(function&& __f) noexcept { __f_ = _VSTD::move(__f.__f_); return *this; @@ -1155,7 +1155,7 @@ template function<_Rp(_ArgTypes...)>& -function<_Rp(_ArgTypes...)>::operator=(nullptr_t) _NOEXCEPT +function<_Rp(_ArgTypes...)>::operator=(nullptr_t) noexcept { __f_ = nullptr; return *this; @@ -1175,7 +1175,7 @@ template void -function<_Rp(_ArgTypes...)>::swap(function& __f) _NOEXCEPT +function<_Rp(_ArgTypes...)>::swap(function& __f) noexcept { __f_.swap(__f.__f_); } @@ -1191,7 +1191,7 @@ template const std::type_info& -function<_Rp(_ArgTypes...)>::target_type() const _NOEXCEPT +function<_Rp(_ArgTypes...)>::target_type() const noexcept { return __f_.target_type(); } @@ -1199,7 +1199,7 @@ template template _Tp* -function<_Rp(_ArgTypes...)>::target() _NOEXCEPT +function<_Rp(_ArgTypes...)>::target() noexcept { return (_Tp*)(__f_.template target<_Tp>()); } @@ -1207,7 +1207,7 @@ template template const _Tp* -function<_Rp(_ArgTypes...)>::target() const _NOEXCEPT +function<_Rp(_ArgTypes...)>::target() const noexcept { return __f_.template target<_Tp>(); } @@ -1217,27 +1217,27 @@ template inline _LIBCPP_INLINE_VISIBILITY bool -operator==(const function<_Rp(_ArgTypes...)>& __f, nullptr_t) _NOEXCEPT {return !__f;} +operator==(const function<_Rp(_ArgTypes...)>& __f, nullptr_t) noexcept {return !__f;} template inline _LIBCPP_INLINE_VISIBILITY bool -operator==(nullptr_t, const function<_Rp(_ArgTypes...)>& __f) _NOEXCEPT {return !__f;} +operator==(nullptr_t, const function<_Rp(_ArgTypes...)>& __f) noexcept {return !__f;} template inline _LIBCPP_INLINE_VISIBILITY bool -operator!=(const function<_Rp(_ArgTypes...)>& __f, nullptr_t) _NOEXCEPT {return (bool)__f;} +operator!=(const function<_Rp(_ArgTypes...)>& __f, nullptr_t) noexcept {return (bool)__f;} template inline _LIBCPP_INLINE_VISIBILITY bool -operator!=(nullptr_t, const function<_Rp(_ArgTypes...)>& __f) _NOEXCEPT {return (bool)__f;} +operator!=(nullptr_t, const function<_Rp(_ArgTypes...)>& __f) noexcept {return (bool)__f;} template inline _LIBCPP_INLINE_VISIBILITY void -swap(function<_Rp(_ArgTypes...)>& __x, function<_Rp(_ArgTypes...)>& __y) _NOEXCEPT +swap(function<_Rp(_ArgTypes...)>& __x, function<_Rp(_ArgTypes...)>& __y) noexcept {return __x.swap(__y);} #elif defined(_LIBCPP_ENABLE_CXX03_FUNCTION) diff --git a/libcxx/include/__functional/hash.h b/libcxx/include/__functional/hash.h --- a/libcxx/include/__functional/hash.h +++ b/libcxx/include/__functional/hash.h @@ -648,7 +648,7 @@ : public __unary_function { _LIBCPP_INLINE_VISIBILITY - size_t operator()(nullptr_t) const _NOEXCEPT { + size_t operator()(nullptr_t) const noexcept { return 662607004ull; } }; diff --git a/libcxx/include/__hash_table b/libcxx/include/__hash_table --- a/libcxx/include/__hash_table +++ b/libcxx/include/__hash_table @@ -1229,7 +1229,7 @@ || __is_nothrow_swappable<__node_allocator>::value) ); #else - _NOEXCEPT_(__is_nothrow_swappable::value && __is_nothrow_swappable::value); + noexcept(__is_nothrow_swappable::value && __is_nothrow_swappable::value); #endif _LIBCPP_INLINE_VISIBILITY diff --git a/libcxx/include/__iterator/data.h b/libcxx/include/__iterator/data.h --- a/libcxx/include/__iterator/data.h +++ b/libcxx/include/__iterator/data.h @@ -25,16 +25,16 @@ template constexpr _LIBCPP_INLINE_VISIBILITY auto data(_Cont& __c) -_NOEXCEPT_(noexcept(__c.data())) --> decltype (__c.data()) -{ return __c.data(); } +noexcept(noexcept(__c.data())) +-> decltype (__c.data()) +{ return __c.data(); } template constexpr _LIBCPP_INLINE_VISIBILITY auto data(const _Cont& __c) -_NOEXCEPT_(noexcept(__c.data())) --> decltype (__c.data()) -{ return __c.data(); } +noexcept(noexcept(__c.data())) +-> decltype (__c.data()) +{ return __c.data(); } template _LIBCPP_INLINE_VISIBILITY diff --git a/libcxx/include/__iterator/empty.h b/libcxx/include/__iterator/empty.h --- a/libcxx/include/__iterator/empty.h +++ b/libcxx/include/__iterator/empty.h @@ -25,9 +25,9 @@ template _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY constexpr auto empty(const _Cont& __c) -_NOEXCEPT_(noexcept(__c.empty())) --> decltype (__c.empty()) -{ return __c.empty(); } +noexcept(noexcept(__c.empty())) +-> decltype (__c.empty()) +{ return __c.empty(); } template _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY diff --git a/libcxx/include/__iterator/size.h b/libcxx/include/__iterator/size.h --- a/libcxx/include/__iterator/size.h +++ b/libcxx/include/__iterator/size.h @@ -25,9 +25,9 @@ template _LIBCPP_INLINE_VISIBILITY constexpr auto size(const _Cont& __c) -_NOEXCEPT_(noexcept(__c.size())) --> decltype (__c.size()) -{ return __c.size(); } +noexcept(noexcept(__c.size())) +-> decltype (__c.size()) +{ return __c.size(); } template _LIBCPP_INLINE_VISIBILITY @@ -37,9 +37,9 @@ template _LIBCPP_INLINE_VISIBILITY constexpr auto ssize(const _Cont& __c) -_NOEXCEPT_(noexcept(static_cast>>(__c.size()))) --> common_type_t> -{ return static_cast>>(__c.size()); } +noexcept(noexcept(static_cast>>(__c.size()))) +-> common_type_t> +{ return static_cast>>(__c.size()); } // GCC complains about the implicit conversion from ptrdiff_t to size_t in // the array bound. diff --git a/libcxx/include/__iterator/wrap_iter.h b/libcxx/include/__iterator/wrap_iter.h --- a/libcxx/include/__iterator/wrap_iter.h +++ b/libcxx/include/__iterator/wrap_iter.h @@ -242,7 +242,7 @@ template _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 #ifndef _LIBCPP_CXX03_LANG -auto operator-(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT +auto operator-(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) noexcept -> decltype(__x.base() - __y.base()) #else typename __wrap_iter<_Iter1>::difference_type diff --git a/libcxx/include/__memory/shared_ptr.h b/libcxx/include/__memory/shared_ptr.h --- a/libcxx/include/__memory/shared_ptr.h +++ b/libcxx/include/__memory/shared_ptr.h @@ -1719,19 +1719,19 @@ { template _LIBCPP_INLINE_VISIBILITY - bool operator()( shared_ptr<_Tp> const& __x, shared_ptr<_Up> const& __y) const _NOEXCEPT + bool operator()( shared_ptr<_Tp> const& __x, shared_ptr<_Up> const& __y) const noexcept {return __x.owner_before(__y);} template _LIBCPP_INLINE_VISIBILITY - bool operator()( shared_ptr<_Tp> const& __x, weak_ptr<_Up> const& __y) const _NOEXCEPT + bool operator()( shared_ptr<_Tp> const& __x, weak_ptr<_Up> const& __y) const noexcept {return __x.owner_before(__y);} template _LIBCPP_INLINE_VISIBILITY - bool operator()( weak_ptr<_Tp> const& __x, shared_ptr<_Up> const& __y) const _NOEXCEPT + bool operator()( weak_ptr<_Tp> const& __x, shared_ptr<_Up> const& __y) const noexcept {return __x.owner_before(__y);} template _LIBCPP_INLINE_VISIBILITY - bool operator()( weak_ptr<_Tp> const& __x, weak_ptr<_Up> const& __y) const _NOEXCEPT + bool operator()( weak_ptr<_Tp> const& __x, weak_ptr<_Up> const& __y) const noexcept {return __x.owner_before(__y);} typedef void is_transparent; }; diff --git a/libcxx/include/__memory/swap_allocator.h b/libcxx/include/__memory/swap_allocator.h --- a/libcxx/include/__memory/swap_allocator.h +++ b/libcxx/include/__memory/swap_allocator.h @@ -23,7 +23,7 @@ template _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 void __swap_allocator(_Alloc& __a1, _Alloc& __a2, true_type) #if _LIBCPP_STD_VER > 11 - _NOEXCEPT + noexcept #else _NOEXCEPT_(__is_nothrow_swappable<_Alloc>::value) #endif @@ -39,7 +39,7 @@ template inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 void __swap_allocator(_Alloc& __a1, _Alloc& __a2) #if _LIBCPP_STD_VER > 11 - _NOEXCEPT + noexcept #else _NOEXCEPT_(__is_nothrow_swappable<_Alloc>::value) #endif diff --git a/libcxx/include/__split_buffer b/libcxx/include/__split_buffer --- a/libcxx/include/__split_buffer +++ b/libcxx/include/__split_buffer @@ -637,7 +637,7 @@ inline _LIBCPP_INLINE_VISIBILITY void swap(__split_buffer<_Tp, _Allocator>& __x, __split_buffer<_Tp, _Allocator>& __y) - _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y))) + _NOEXCEPT_(noexcept(__x.swap(__y))) { __x.swap(__y); } diff --git a/libcxx/include/__tree b/libcxx/include/__tree --- a/libcxx/include/__tree +++ b/libcxx/include/__tree @@ -1144,7 +1144,7 @@ __is_nothrow_swappable<__node_allocator>::value) ); #else - _NOEXCEPT_(__is_nothrow_swappable::value); + noexcept(__is_nothrow_swappable::value); #endif template diff --git a/libcxx/include/deque b/libcxx/include/deque --- a/libcxx/include/deque +++ b/libcxx/include/deque @@ -1071,7 +1071,7 @@ void swap(__deque_base& __c) #if _LIBCPP_STD_VER >= 14 - _NOEXCEPT; + noexcept; #else _NOEXCEPT_(!__alloc_traits::propagate_on_container_swap::value || __is_nothrow_swappable::value); @@ -1240,7 +1240,7 @@ void __deque_base<_Tp, _Allocator>::swap(__deque_base& __c) #if _LIBCPP_STD_VER >= 14 - _NOEXCEPT + noexcept #else _NOEXCEPT_(!__alloc_traits::propagate_on_container_swap::value || __is_nothrow_swappable::value) @@ -1480,7 +1480,7 @@ _LIBCPP_INLINE_VISIBILITY void swap(deque& __c) #if _LIBCPP_STD_VER >= 14 - _NOEXCEPT; + noexcept; #else _NOEXCEPT_(!__alloc_traits::propagate_on_container_swap::value || __is_nothrow_swappable::value); @@ -2952,7 +2952,7 @@ void deque<_Tp, _Allocator>::swap(deque& __c) #if _LIBCPP_STD_VER >= 14 - _NOEXCEPT + noexcept #else _NOEXCEPT_(!__alloc_traits::propagate_on_container_swap::value || __is_nothrow_swappable::value) @@ -3022,7 +3022,7 @@ inline _LIBCPP_INLINE_VISIBILITY void swap(deque<_Tp, _Allocator>& __x, deque<_Tp, _Allocator>& __y) - _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y))) + _NOEXCEPT_(noexcept(__x.swap(__y))) { __x.swap(__y); } diff --git a/libcxx/include/forward_list b/libcxx/include/forward_list --- a/libcxx/include/forward_list +++ b/libcxx/include/forward_list @@ -559,7 +559,7 @@ _LIBCPP_INLINE_VISIBILITY void swap(__forward_list_base& __x) #if _LIBCPP_STD_VER >= 14 - _NOEXCEPT; + noexcept; #else _NOEXCEPT_(!__node_traits::propagate_on_container_swap::value || __is_nothrow_swappable<__node_allocator>::value); @@ -624,7 +624,7 @@ void __forward_list_base<_Tp, _Alloc>::swap(__forward_list_base& __x) #if _LIBCPP_STD_VER >= 14 - _NOEXCEPT + noexcept #else _NOEXCEPT_(!__node_traits::propagate_on_container_swap::value || __is_nothrow_swappable<__node_allocator>::value) @@ -826,7 +826,7 @@ _LIBCPP_INLINE_VISIBILITY void swap(forward_list& __x) #if _LIBCPP_STD_VER >= 14 - _NOEXCEPT + noexcept #else _NOEXCEPT_(!__node_traits::propagate_on_container_swap::value || __is_nothrow_swappable<__node_allocator>::value) @@ -874,7 +874,7 @@ #ifndef _LIBCPP_CXX03_LANG void __move_assign(forward_list& __x, true_type) - _NOEXCEPT_(is_nothrow_move_assignable::value); + noexcept(is_nothrow_move_assignable::value); void __move_assign(forward_list& __x, false_type); #endif // _LIBCPP_CXX03_LANG @@ -1763,7 +1763,7 @@ inline _LIBCPP_INLINE_VISIBILITY void swap(forward_list<_Tp, _Alloc>& __x, forward_list<_Tp, _Alloc>& __y) - _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y))) + _NOEXCEPT_(noexcept(__x.swap(__y))) { __x.swap(__y); } diff --git a/libcxx/include/list b/libcxx/include/list --- a/libcxx/include/list +++ b/libcxx/include/list @@ -638,7 +638,7 @@ void swap(__list_imp& __c) #if _LIBCPP_STD_VER >= 14 - _NOEXCEPT; + noexcept; #else _NOEXCEPT_(!__alloc_traits::propagate_on_container_swap::value || __is_nothrow_swappable::value); @@ -751,7 +751,7 @@ void __list_imp<_Tp, _Alloc>::swap(__list_imp& __c) #if _LIBCPP_STD_VER >= 14 - _NOEXCEPT + noexcept #else _NOEXCEPT_(!__alloc_traits::propagate_on_container_swap::value || __is_nothrow_swappable::value) @@ -1028,7 +1028,7 @@ _LIBCPP_INLINE_VISIBILITY void swap(list& __c) #if _LIBCPP_STD_VER >= 14 - _NOEXCEPT + noexcept #else _NOEXCEPT_(!__node_alloc_traits::propagate_on_container_swap::value || __is_nothrow_swappable<__node_allocator>::value) @@ -2333,7 +2333,7 @@ inline _LIBCPP_INLINE_VISIBILITY void swap(list<_Tp, _Alloc>& __x, list<_Tp, _Alloc>& __y) - _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y))) + _NOEXCEPT_(noexcept(__x.swap(__y))) { __x.swap(__y); } diff --git a/libcxx/include/map b/libcxx/include/map --- a/libcxx/include/map +++ b/libcxx/include/map @@ -667,7 +667,7 @@ void swap(__map_value_compare<_Key, _CP, _Compare, __b>& __x, __map_value_compare<_Key, _CP, _Compare, __b>& __y) - _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y))) + _NOEXCEPT_(noexcept(__x.swap(__y))) { __x.swap(__y); } @@ -1726,7 +1726,7 @@ void swap(map<_Key, _Tp, _Compare, _Allocator>& __x, map<_Key, _Tp, _Compare, _Allocator>& __y) - _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y))) + _NOEXCEPT_(noexcept(__x.swap(__y))) { __x.swap(__y); } @@ -2317,7 +2317,7 @@ void swap(multimap<_Key, _Tp, _Compare, _Allocator>& __x, multimap<_Key, _Tp, _Compare, _Allocator>& __y) - _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y))) + _NOEXCEPT_(noexcept(__x.swap(__y))) { __x.swap(__y); } diff --git a/libcxx/include/queue b/libcxx/include/queue --- a/libcxx/include/queue +++ b/libcxx/include/queue @@ -479,7 +479,7 @@ inline _LIBCPP_INLINE_VISIBILITY __enable_if_t<__is_swappable<_Container>::value, void> swap(queue<_Tp, _Container>& __x, queue<_Tp, _Container>& __y) - _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y))) + _NOEXCEPT_(noexcept(__x.swap(__y))) { __x.swap(__y); } @@ -947,7 +947,7 @@ > swap(priority_queue<_Tp, _Container, _Compare>& __x, priority_queue<_Tp, _Container, _Compare>& __y) - _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y))) + _NOEXCEPT_(noexcept(__x.swap(__y))) { __x.swap(__y); } diff --git a/libcxx/include/set b/libcxx/include/set --- a/libcxx/include/set +++ b/libcxx/include/set @@ -1031,7 +1031,7 @@ void swap(set<_Key, _Compare, _Allocator>& __x, set<_Key, _Compare, _Allocator>& __y) - _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y))) + _NOEXCEPT_(noexcept(__x.swap(__y))) { __x.swap(__y); } @@ -1562,7 +1562,7 @@ void swap(multiset<_Key, _Compare, _Allocator>& __x, multiset<_Key, _Compare, _Allocator>& __y) - _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y))) + _NOEXCEPT_(noexcept(__x.swap(__y))) { __x.swap(__y); } diff --git a/libcxx/include/stack b/libcxx/include/stack --- a/libcxx/include/stack +++ b/libcxx/include/stack @@ -350,7 +350,7 @@ inline _LIBCPP_INLINE_VISIBILITY __enable_if_t<__is_swappable<_Container>::value, void> swap(stack<_Tp, _Container>& __x, stack<_Tp, _Container>& __y) - _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y))) + _NOEXCEPT_(noexcept(__x.swap(__y))) { __x.swap(__y); } diff --git a/libcxx/include/string b/libcxx/include/string --- a/libcxx/include/string +++ b/libcxx/include/string @@ -817,7 +817,7 @@ #if _LIBCPP_STD_VER <= 14 _NOEXCEPT_(is_nothrow_copy_constructible::value); #else - _NOEXCEPT; + noexcept; #endif _LIBCPP_CONSTEXPR_AFTER_CXX17 basic_string(const basic_string& __str); @@ -829,7 +829,7 @@ #if _LIBCPP_STD_VER <= 14 _NOEXCEPT_(is_nothrow_move_constructible::value); #else - _NOEXCEPT; + noexcept; #endif _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 @@ -1267,7 +1267,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 void swap(basic_string& __str) #if _LIBCPP_STD_VER >= 14 - _NOEXCEPT; + noexcept; #else _NOEXCEPT_(!__alloc_traits::propagate_on_container_swap::value || __is_nothrow_swappable::value); @@ -1740,7 +1740,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 void __move_assign(basic_string& __str, true_type) #if _LIBCPP_STD_VER > 14 - _NOEXCEPT; + noexcept; #else _NOEXCEPT_(is_nothrow_move_assignable::value); #endif @@ -1908,7 +1908,7 @@ #if _LIBCPP_STD_VER <= 14 _NOEXCEPT_(is_nothrow_copy_constructible::value) #else - _NOEXCEPT + noexcept #endif : __r_(__default_init_tag(), __a) { @@ -2062,7 +2062,7 @@ #if _LIBCPP_STD_VER <= 14 _NOEXCEPT_(is_nothrow_move_constructible::value) #else - _NOEXCEPT + noexcept #endif : __r_(std::move(__str.__r_)) { @@ -2528,7 +2528,7 @@ void basic_string<_CharT, _Traits, _Allocator>::__move_assign(basic_string& __str, true_type) #if _LIBCPP_STD_VER > 14 - _NOEXCEPT + noexcept #else _NOEXCEPT_(is_nothrow_move_assignable::value) #endif @@ -3578,7 +3578,7 @@ void basic_string<_CharT, _Traits, _Allocator>::swap(basic_string& __str) #if _LIBCPP_STD_VER >= 14 - _NOEXCEPT + noexcept #else _NOEXCEPT_(!__alloc_traits::propagate_on_container_swap::value || __is_nothrow_swappable::value) @@ -4503,7 +4503,7 @@ void swap(basic_string<_CharT, _Traits, _Allocator>& __lhs, basic_string<_CharT, _Traits, _Allocator>& __rhs) - _NOEXCEPT_(_NOEXCEPT_(__lhs.swap(__rhs))) + _NOEXCEPT_(noexcept(__lhs.swap(__rhs))) { __lhs.swap(__rhs); } @@ -4678,7 +4678,7 @@ #ifndef _LIBCPP_HAS_NO_CHAR8_T inline _LIBCPP_HIDE_FROM_ABI constexpr - basic_string operator "" s(const char8_t *__str, size_t __len) _NOEXCEPT + basic_string operator "" s(const char8_t *__str, size_t __len) noexcept { return basic_string (__str, __len); } diff --git a/libcxx/include/string_view b/libcxx/include/string_view --- a/libcxx/include/string_view +++ b/libcxx/include/string_view @@ -786,7 +786,7 @@ if ( __lhs.size() != __rhs.size()) return false; return __lhs.compare(__rhs) == 0; } -#endif // _LIBCPP_STD_VER > 17 +#endif // _LIBCPP_STD_VER < 20 // operator <=> diff --git a/libcxx/include/tuple b/libcxx/include/tuple --- a/libcxx/include/tuple +++ b/libcxx/include/tuple @@ -1454,7 +1454,7 @@ return _VSTD::get<__find_exactly_one_t<_T1, _Args...>::value>(_VSTD::move(__tup)); } -#endif +#endif // _LIBCPP_STD_VER > 11 // tie diff --git a/libcxx/include/unordered_map b/libcxx/include/unordered_map --- a/libcxx/include/unordered_map +++ b/libcxx/include/unordered_map @@ -634,7 +634,7 @@ void swap(__unordered_map_hasher<_Key, _Cp, _Hash, _Pred, __b>& __x, __unordered_map_hasher<_Key, _Cp, _Hash, _Pred, __b>& __y) - _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y))) + _NOEXCEPT_(noexcept(__x.swap(__y))) { __x.swap(__y); } @@ -747,7 +747,7 @@ void swap(__unordered_map_equal<_Key, _Cp, _Pred, _Hash, __b>& __x, __unordered_map_equal<_Key, _Cp, _Pred, _Hash, __b>& __y) - _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y))) + _NOEXCEPT_(noexcept(__x.swap(__y))) { __x.swap(__y); } @@ -1869,7 +1869,7 @@ void swap(unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) - _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y))) + _NOEXCEPT_(noexcept(__x.swap(__y))) { __x.swap(__y); } @@ -2575,7 +2575,7 @@ void swap(unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) - _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y))) + _NOEXCEPT_(noexcept(__x.swap(__y))) { __x.swap(__y); } diff --git a/libcxx/include/unordered_set b/libcxx/include/unordered_set --- a/libcxx/include/unordered_set +++ b/libcxx/include/unordered_set @@ -1113,7 +1113,7 @@ void swap(unordered_set<_Value, _Hash, _Pred, _Alloc>& __x, unordered_set<_Value, _Hash, _Pred, _Alloc>& __y) - _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y))) + _NOEXCEPT_(noexcept(__x.swap(__y))) { __x.swap(__y); } @@ -1277,7 +1277,7 @@ #ifndef _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY unordered_multiset& operator=(unordered_multiset&& __u) - _NOEXCEPT_(is_nothrow_move_assignable<__table>::value); + noexcept(is_nothrow_move_assignable<__table>::value); unordered_multiset& operator=(initializer_list __il); #endif // _LIBCPP_CXX03_LANG @@ -1751,7 +1751,7 @@ void swap(unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x, unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y) - _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y))) + _NOEXCEPT_(noexcept(__x.swap(__y))) { __x.swap(__y); } diff --git a/libcxx/include/vector b/libcxx/include/vector --- a/libcxx/include/vector +++ b/libcxx/include/vector @@ -369,7 +369,7 @@ #if _LIBCPP_STD_VER <= 14 _NOEXCEPT_(is_nothrow_copy_constructible::value) #else - _NOEXCEPT + noexcept #endif : __end_cap_(nullptr, __a) { @@ -644,7 +644,7 @@ _LIBCPP_CONSTEXPR_AFTER_CXX17 void swap(vector&) #if _LIBCPP_STD_VER >= 14 - _NOEXCEPT; + noexcept; #else _NOEXCEPT_(!__alloc_traits::propagate_on_container_swap::value || __is_nothrow_swappable::value); @@ -1937,7 +1937,7 @@ void vector<_Tp, _Allocator>::swap(vector& __x) #if _LIBCPP_STD_VER >= 14 - _NOEXCEPT + noexcept #else _NOEXCEPT_(!__alloc_traits::propagate_on_container_swap::value || __is_nothrow_swappable::value) @@ -2109,7 +2109,7 @@ #if _LIBCPP_STD_VER <= 14 _NOEXCEPT_(is_nothrow_copy_constructible::value); #else - _NOEXCEPT; + noexcept; #endif _LIBCPP_CONSTEXPR_AFTER_CXX17 ~vector(); _LIBCPP_CONSTEXPR_AFTER_CXX17 explicit vector(size_type __n); @@ -2296,7 +2296,7 @@ _LIBCPP_CONSTEXPR_AFTER_CXX17 void swap(vector&) #if _LIBCPP_STD_VER >= 14 - _NOEXCEPT; + noexcept; #else _NOEXCEPT_(!__alloc_traits::propagate_on_container_swap::value || __is_nothrow_swappable::value); @@ -2518,7 +2518,7 @@ #if _LIBCPP_STD_VER <= 14 _NOEXCEPT_(is_nothrow_copy_constructible::value) #else - _NOEXCEPT + noexcept #endif : __begin_(nullptr), __size_(0), @@ -2768,7 +2768,7 @@ template inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 vector::vector(vector&& __v) #if _LIBCPP_STD_VER > 14 - _NOEXCEPT + noexcept #else _NOEXCEPT_(is_nothrow_move_constructible::value) #endif @@ -3115,7 +3115,7 @@ _LIBCPP_CONSTEXPR_AFTER_CXX17 void vector::swap(vector& __x) #if _LIBCPP_STD_VER >= 14 - _NOEXCEPT + noexcept #else _NOEXCEPT_(!__alloc_traits::propagate_on_container_swap::value || __is_nothrow_swappable::value) @@ -3283,7 +3283,7 @@ inline _LIBCPP_HIDE_FROM_ABI void swap(vector<_Tp, _Allocator>& __x, vector<_Tp, _Allocator>& __y) - _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y))) + _NOEXCEPT_(noexcept(__x.swap(__y))) { __x.swap(__y); }