[libcxx-commits] [libcxx] 2bb0a9e - [libc++][NFC] Change `_NOEXCEPT` to `noexcept` for components not in C++03 (#216948)
via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Aug 18 04:12:27 PDT 2026
Author: A. Jiang
Date: 2026-08-18T19:12:23+08:00
New Revision: 2bb0a9e06d949728838aa9ddf5b44c9af8d424a3
URL: https://github.com/llvm/llvm-project/commit/2bb0a9e06d949728838aa9ddf5b44c9af8d424a3
DIFF: https://github.com/llvm/llvm-project/commit/2bb0a9e06d949728838aa9ddf5b44c9af8d424a3.diff
LOG: [libc++][NFC] Change `_NOEXCEPT` to `noexcept` for components not in C++03 (#216948)
Added:
Modified:
libcxx/include/__atomic/atomic.h
libcxx/include/__atomic/atomic_flag.h
libcxx/include/__atomic/atomic_sync.h
libcxx/include/__atomic/atomic_sync_timed.h
libcxx/include/__cmath/lerp.h
libcxx/include/__fwd/tuple.h
libcxx/include/__type_traits/integral_constant.h
libcxx/include/initializer_list
libcxx/include/scoped_allocator
libcxx/include/shared_mutex
libcxx/include/tuple
libcxx/src/atomic.cpp
Removed:
################################################################################
diff --git a/libcxx/include/__atomic/atomic.h b/libcxx/include/__atomic/atomic.h
index 02721dfd36090..c57b60fc2b4bb 100644
--- a/libcxx/include/__atomic/atomic.h
+++ b/libcxx/include/__atomic/atomic.h
@@ -117,16 +117,16 @@ struct __atomic_base // false
}
#if _LIBCPP_STD_VER >= 20
- _LIBCPP_HIDE_FROM_ABI void wait(_Tp __v, memory_order __m = memory_order_seq_cst) const volatile _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI void wait(_Tp __v, memory_order __m = memory_order_seq_cst) const volatile noexcept {
std::__atomic_wait(*this, __v, __m);
}
- _LIBCPP_HIDE_FROM_ABI void wait(_Tp __v, memory_order __m = memory_order_seq_cst) const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI void wait(_Tp __v, memory_order __m = memory_order_seq_cst) const noexcept {
std::__atomic_wait(*this, __v, __m);
}
- _LIBCPP_HIDE_FROM_ABI void notify_one() volatile _NOEXCEPT { std::__atomic_notify_one(*this); }
- _LIBCPP_HIDE_FROM_ABI void notify_one() _NOEXCEPT { std::__atomic_notify_one(*this); }
- _LIBCPP_HIDE_FROM_ABI void notify_all() volatile _NOEXCEPT { std::__atomic_notify_all(*this); }
- _LIBCPP_HIDE_FROM_ABI void notify_all() _NOEXCEPT { std::__atomic_notify_all(*this); }
+ _LIBCPP_HIDE_FROM_ABI void notify_one() volatile noexcept { std::__atomic_notify_one(*this); }
+ _LIBCPP_HIDE_FROM_ABI void notify_one() noexcept { std::__atomic_notify_one(*this); }
+ _LIBCPP_HIDE_FROM_ABI void notify_all() volatile noexcept { std::__atomic_notify_all(*this); }
+ _LIBCPP_HIDE_FROM_ABI void notify_all() noexcept { std::__atomic_notify_all(*this); }
#endif // _LIBCPP_STD_VER >= 20
#if _LIBCPP_STD_VER >= 20
@@ -327,22 +327,22 @@ struct atomic<_Tp*> : public __atomic_base<_Tp*> {
}
#if _LIBCPP_STD_VER >= 26
- _LIBCPP_HIDE_FROM_ABI _Tp* fetch_max(_Tp* __op, memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI _Tp* fetch_max(_Tp* __op, memory_order __m = memory_order_seq_cst) volatile noexcept {
static_assert(!is_function<__remove_pointer_t<_Tp> >::value, "Pointer to function isn't allowed");
return std::__cxx_atomic_fetch_max(std::addressof(this->__a_), __op, __m);
}
- _LIBCPP_HIDE_FROM_ABI _Tp* fetch_max(_Tp* __op, memory_order __m = memory_order_seq_cst) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI _Tp* fetch_max(_Tp* __op, memory_order __m = memory_order_seq_cst) noexcept {
static_assert(!is_function<__remove_pointer_t<_Tp> >::value, "Pointer to function isn't allowed");
return std::__cxx_atomic_fetch_max(std::addressof(this->__a_), __op, __m);
}
- _LIBCPP_HIDE_FROM_ABI _Tp* fetch_min(_Tp* __op, memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI _Tp* fetch_min(_Tp* __op, memory_order __m = memory_order_seq_cst) volatile noexcept {
static_assert(!is_function<__remove_pointer_t<_Tp> >::value, "Pointer to function isn't allowed");
return std::__cxx_atomic_fetch_min(std::addressof(this->__a_), __op, __m);
}
- _LIBCPP_HIDE_FROM_ABI _Tp* fetch_min(_Tp* __op, memory_order __m = memory_order_seq_cst) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI _Tp* fetch_min(_Tp* __op, memory_order __m = memory_order_seq_cst) noexcept {
static_assert(!is_function<__remove_pointer_t<_Tp> >::value, "Pointer to function isn't allowed");
return std::__cxx_atomic_fetch_min(std::addressof(this->__a_), __op, __m);
}
@@ -659,13 +659,12 @@ _LIBCPP_HIDE_FROM_ABI bool atomic_compare_exchange_strong_explicit(
// atomic_wait
template <class _Tp>
-_LIBCPP_HIDE_FROM_ABI void
-atomic_wait(const volatile atomic<_Tp>* __o, typename atomic<_Tp>::value_type __v) _NOEXCEPT {
+_LIBCPP_HIDE_FROM_ABI void atomic_wait(const volatile atomic<_Tp>* __o, typename atomic<_Tp>::value_type __v) noexcept {
return __o->wait(__v);
}
template <class _Tp>
-_LIBCPP_HIDE_FROM_ABI void atomic_wait(const atomic<_Tp>* __o, typename atomic<_Tp>::value_type __v) _NOEXCEPT {
+_LIBCPP_HIDE_FROM_ABI void atomic_wait(const atomic<_Tp>* __o, typename atomic<_Tp>::value_type __v) noexcept {
return __o->wait(__v);
}
@@ -673,14 +672,14 @@ _LIBCPP_HIDE_FROM_ABI void atomic_wait(const atomic<_Tp>* __o, typename atomic<_
template <class _Tp>
_LIBCPP_HIDE_FROM_ABI void
-atomic_wait_explicit(const volatile atomic<_Tp>* __o, typename atomic<_Tp>::value_type __v, memory_order __m) _NOEXCEPT
+atomic_wait_explicit(const volatile atomic<_Tp>* __o, typename atomic<_Tp>::value_type __v, memory_order __m) noexcept
_LIBCPP_CHECK_LOAD_MEMORY_ORDER(__m) {
return __o->wait(__v, __m);
}
template <class _Tp>
_LIBCPP_HIDE_FROM_ABI void
-atomic_wait_explicit(const atomic<_Tp>* __o, typename atomic<_Tp>::value_type __v, memory_order __m) _NOEXCEPT
+atomic_wait_explicit(const atomic<_Tp>* __o, typename atomic<_Tp>::value_type __v, memory_order __m) noexcept
_LIBCPP_CHECK_LOAD_MEMORY_ORDER(__m) {
return __o->wait(__v, __m);
}
@@ -688,22 +687,22 @@ atomic_wait_explicit(const atomic<_Tp>* __o, typename atomic<_Tp>::value_type __
// atomic_notify_one
template <class _Tp>
-_LIBCPP_HIDE_FROM_ABI void atomic_notify_one(volatile atomic<_Tp>* __o) _NOEXCEPT {
+_LIBCPP_HIDE_FROM_ABI void atomic_notify_one(volatile atomic<_Tp>* __o) noexcept {
__o->notify_one();
}
template <class _Tp>
-_LIBCPP_HIDE_FROM_ABI void atomic_notify_one(atomic<_Tp>* __o) _NOEXCEPT {
+_LIBCPP_HIDE_FROM_ABI void atomic_notify_one(atomic<_Tp>* __o) noexcept {
__o->notify_one();
}
// atomic_notify_all
template <class _Tp>
-_LIBCPP_HIDE_FROM_ABI void atomic_notify_all(volatile atomic<_Tp>* __o) _NOEXCEPT {
+_LIBCPP_HIDE_FROM_ABI void atomic_notify_all(volatile atomic<_Tp>* __o) noexcept {
__o->notify_all();
}
template <class _Tp>
-_LIBCPP_HIDE_FROM_ABI void atomic_notify_all(atomic<_Tp>* __o) _NOEXCEPT {
+_LIBCPP_HIDE_FROM_ABI void atomic_notify_all(atomic<_Tp>* __o) noexcept {
__o->notify_all();
}
@@ -846,13 +845,13 @@ atomic_fetch_xor_explicit(atomic<_Tp>* __o, typename atomic<_Tp>::value_type __o
template <class _Tp>
requires((integral<_Tp> && !same_as<_Tp, bool>) || is_pointer_v<_Tp>)
-_LIBCPP_HIDE_FROM_ABI _Tp atomic_fetch_max(volatile atomic<_Tp>* __o, typename atomic<_Tp>::value_type __op) _NOEXCEPT {
+_LIBCPP_HIDE_FROM_ABI _Tp atomic_fetch_max(volatile atomic<_Tp>* __o, typename atomic<_Tp>::value_type __op) noexcept {
return __o->fetch_max(__op);
}
template <class _Tp>
requires((integral<_Tp> && !same_as<_Tp, bool>) || is_pointer_v<_Tp>)
-_LIBCPP_HIDE_FROM_ABI _Tp atomic_fetch_max(atomic<_Tp>* __o, typename atomic<_Tp>::value_type __op) _NOEXCEPT {
+_LIBCPP_HIDE_FROM_ABI _Tp atomic_fetch_max(atomic<_Tp>* __o, typename atomic<_Tp>::value_type __op) noexcept {
return __o->fetch_max(__op);
}
@@ -860,15 +859,15 @@ _LIBCPP_HIDE_FROM_ABI _Tp atomic_fetch_max(atomic<_Tp>* __o, typename atomic<_Tp
template <class _Tp>
requires((integral<_Tp> && !same_as<_Tp, bool>) || is_pointer_v<_Tp>)
-_LIBCPP_HIDE_FROM_ABI _Tp atomic_fetch_max_explicit(
- volatile atomic<_Tp>* __o, typename atomic<_Tp>::value_type __op, memory_order __m) _NOEXCEPT {
+_LIBCPP_HIDE_FROM_ABI _Tp
+atomic_fetch_max_explicit(volatile atomic<_Tp>* __o, typename atomic<_Tp>::value_type __op, memory_order __m) noexcept {
return __o->fetch_max(__op, __m);
}
template <class _Tp>
requires((integral<_Tp> && !same_as<_Tp, bool>) || is_pointer_v<_Tp>)
_LIBCPP_HIDE_FROM_ABI _Tp
-atomic_fetch_max_explicit(atomic<_Tp>* __o, typename atomic<_Tp>::value_type __op, memory_order __m) _NOEXCEPT {
+atomic_fetch_max_explicit(atomic<_Tp>* __o, typename atomic<_Tp>::value_type __op, memory_order __m) noexcept {
return __o->fetch_max(__op, __m);
}
@@ -876,13 +875,13 @@ atomic_fetch_max_explicit(atomic<_Tp>* __o, typename atomic<_Tp>::value_type __o
template <class _Tp>
requires((integral<_Tp> && !same_as<_Tp, bool>) || is_pointer_v<_Tp>)
-_LIBCPP_HIDE_FROM_ABI _Tp atomic_fetch_min(volatile atomic<_Tp>* __o, typename atomic<_Tp>::value_type __op) _NOEXCEPT {
+_LIBCPP_HIDE_FROM_ABI _Tp atomic_fetch_min(volatile atomic<_Tp>* __o, typename atomic<_Tp>::value_type __op) noexcept {
return __o->fetch_min(__op);
}
template <class _Tp>
requires((integral<_Tp> && !same_as<_Tp, bool>) || is_pointer_v<_Tp>)
-_LIBCPP_HIDE_FROM_ABI _Tp atomic_fetch_min(atomic<_Tp>* __o, typename atomic<_Tp>::value_type __op) _NOEXCEPT {
+_LIBCPP_HIDE_FROM_ABI _Tp atomic_fetch_min(atomic<_Tp>* __o, typename atomic<_Tp>::value_type __op) noexcept {
return __o->fetch_min(__op);
}
@@ -890,15 +889,15 @@ _LIBCPP_HIDE_FROM_ABI _Tp atomic_fetch_min(atomic<_Tp>* __o, typename atomic<_Tp
template <class _Tp>
requires((integral<_Tp> && !same_as<_Tp, bool>) || is_pointer_v<_Tp>)
-_LIBCPP_HIDE_FROM_ABI _Tp atomic_fetch_min_explicit(
- volatile atomic<_Tp>* __o, typename atomic<_Tp>::value_type __op, memory_order __m) _NOEXCEPT {
+_LIBCPP_HIDE_FROM_ABI _Tp
+atomic_fetch_min_explicit(volatile atomic<_Tp>* __o, typename atomic<_Tp>::value_type __op, memory_order __m) noexcept {
return __o->fetch_min(__op, __m);
}
template <class _Tp>
requires((integral<_Tp> && !same_as<_Tp, bool>) || is_pointer_v<_Tp>)
_LIBCPP_HIDE_FROM_ABI _Tp
-atomic_fetch_min_explicit(atomic<_Tp>* __o, typename atomic<_Tp>::value_type __op, memory_order __m) _NOEXCEPT {
+atomic_fetch_min_explicit(atomic<_Tp>* __o, typename atomic<_Tp>::value_type __op, memory_order __m) noexcept {
return __o->fetch_min(__op, __m);
}
#endif
diff --git a/libcxx/include/__atomic/atomic_flag.h b/libcxx/include/__atomic/atomic_flag.h
index 9c3dd13d132d4..f6b563139da93 100644
--- a/libcxx/include/__atomic/atomic_flag.h
+++ b/libcxx/include/__atomic/atomic_flag.h
@@ -46,20 +46,20 @@ struct atomic_flag {
}
#if _LIBCPP_STD_VER >= 20
- _LIBCPP_HIDE_FROM_ABI void wait(bool __v, memory_order __m = memory_order_seq_cst) const volatile _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI void wait(bool __v, memory_order __m = memory_order_seq_cst) const volatile noexcept {
std::__atomic_wait(*this, __v, __m);
}
- _LIBCPP_HIDE_FROM_ABI void wait(bool __v, memory_order __m = memory_order_seq_cst) const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI void wait(bool __v, memory_order __m = memory_order_seq_cst) const noexcept {
std::__atomic_wait(*this, __v, __m);
}
- _LIBCPP_HIDE_FROM_ABI void notify_one() volatile _NOEXCEPT { std::__atomic_notify_one(*this); }
- _LIBCPP_HIDE_FROM_ABI void notify_one() _NOEXCEPT { std::__atomic_notify_one(*this); }
- _LIBCPP_HIDE_FROM_ABI void notify_all() volatile _NOEXCEPT { std::__atomic_notify_all(*this); }
- _LIBCPP_HIDE_FROM_ABI void notify_all() _NOEXCEPT { std::__atomic_notify_all(*this); }
+ _LIBCPP_HIDE_FROM_ABI void notify_one() volatile noexcept { std::__atomic_notify_one(*this); }
+ _LIBCPP_HIDE_FROM_ABI void notify_one() noexcept { std::__atomic_notify_one(*this); }
+ _LIBCPP_HIDE_FROM_ABI void notify_all() volatile noexcept { std::__atomic_notify_all(*this); }
+ _LIBCPP_HIDE_FROM_ABI void notify_all() noexcept { std::__atomic_notify_all(*this); }
#endif
#if _LIBCPP_STD_VER >= 20
- _LIBCPP_HIDE_FROM_ABI constexpr atomic_flag() _NOEXCEPT : __a_(false) {}
+ _LIBCPP_HIDE_FROM_ABI constexpr atomic_flag() noexcept : __a_(false) {}
#else
atomic_flag() _NOEXCEPT = default;
#endif
@@ -136,26 +136,26 @@ inline _LIBCPP_HIDE_FROM_ABI void atomic_flag_clear_explicit(atomic_flag* __o, m
}
#if _LIBCPP_STD_VER >= 20
-inline _LIBCPP_HIDE_FROM_ABI void atomic_flag_wait(const volatile atomic_flag* __o, bool __v) _NOEXCEPT {
+inline _LIBCPP_HIDE_FROM_ABI void atomic_flag_wait(const volatile atomic_flag* __o, bool __v) noexcept {
__o->wait(__v);
}
-inline _LIBCPP_HIDE_FROM_ABI void atomic_flag_wait(const atomic_flag* __o, bool __v) _NOEXCEPT { __o->wait(__v); }
+inline _LIBCPP_HIDE_FROM_ABI void atomic_flag_wait(const atomic_flag* __o, bool __v) noexcept { __o->wait(__v); }
inline _LIBCPP_HIDE_FROM_ABI void
-atomic_flag_wait_explicit(const volatile atomic_flag* __o, bool __v, memory_order __m) _NOEXCEPT {
+atomic_flag_wait_explicit(const volatile atomic_flag* __o, bool __v, memory_order __m) noexcept {
__o->wait(__v, __m);
}
inline _LIBCPP_HIDE_FROM_ABI void
-atomic_flag_wait_explicit(const atomic_flag* __o, bool __v, memory_order __m) _NOEXCEPT {
+atomic_flag_wait_explicit(const atomic_flag* __o, bool __v, memory_order __m) noexcept {
__o->wait(__v, __m);
}
-inline _LIBCPP_HIDE_FROM_ABI void atomic_flag_notify_one(volatile atomic_flag* __o) _NOEXCEPT { __o->notify_one(); }
-inline _LIBCPP_HIDE_FROM_ABI void atomic_flag_notify_one(atomic_flag* __o) _NOEXCEPT { __o->notify_one(); }
-inline _LIBCPP_HIDE_FROM_ABI void atomic_flag_notify_all(volatile atomic_flag* __o) _NOEXCEPT { __o->notify_all(); }
-inline _LIBCPP_HIDE_FROM_ABI void atomic_flag_notify_all(atomic_flag* __o) _NOEXCEPT { __o->notify_all(); }
+inline _LIBCPP_HIDE_FROM_ABI void atomic_flag_notify_one(volatile atomic_flag* __o) noexcept { __o->notify_one(); }
+inline _LIBCPP_HIDE_FROM_ABI void atomic_flag_notify_one(atomic_flag* __o) noexcept { __o->notify_one(); }
+inline _LIBCPP_HIDE_FROM_ABI void atomic_flag_notify_all(volatile atomic_flag* __o) noexcept { __o->notify_all(); }
+inline _LIBCPP_HIDE_FROM_ABI void atomic_flag_notify_all(atomic_flag* __o) noexcept { __o->notify_all(); }
#endif // _LIBCPP_STD_VER >= 20
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__atomic/atomic_sync.h b/libcxx/include/__atomic/atomic_sync.h
index c96cd63a82e3e..1aa6ffa21a8f7 100644
--- a/libcxx/include/__atomic/atomic_sync.h
+++ b/libcxx/include/__atomic/atomic_sync.h
@@ -34,47 +34,47 @@ _LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
# if !_LIBCPP_AVAILABILITY_HAS_NEW_SYNC
// old dylib interface kept for backwards compatibility
-_LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_one(void const volatile*) _NOEXCEPT;
-_LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_all(void const volatile*) _NOEXCEPT;
-_LIBCPP_EXPORTED_FROM_ABI __cxx_contention_t __libcpp_atomic_monitor(void const volatile*) _NOEXCEPT;
-_LIBCPP_EXPORTED_FROM_ABI void __libcpp_atomic_wait(void const volatile*, __cxx_contention_t) _NOEXCEPT;
+_LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_one(void const volatile*) noexcept;
+_LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_all(void const volatile*) noexcept;
+_LIBCPP_EXPORTED_FROM_ABI __cxx_contention_t __libcpp_atomic_monitor(void const volatile*) noexcept;
+_LIBCPP_EXPORTED_FROM_ABI void __libcpp_atomic_wait(void const volatile*, __cxx_contention_t) noexcept;
-_LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_one(__cxx_atomic_contention_t const volatile*) _NOEXCEPT;
-_LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_all(__cxx_atomic_contention_t const volatile*) _NOEXCEPT;
+_LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_one(__cxx_atomic_contention_t const volatile*) noexcept;
+_LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_all(__cxx_atomic_contention_t const volatile*) noexcept;
_LIBCPP_EXPORTED_FROM_ABI __cxx_contention_t
-__libcpp_atomic_monitor(__cxx_atomic_contention_t const volatile*) _NOEXCEPT;
+__libcpp_atomic_monitor(__cxx_atomic_contention_t const volatile*) noexcept;
_LIBCPP_EXPORTED_FROM_ABI void
-__libcpp_atomic_wait(__cxx_atomic_contention_t const volatile*, __cxx_contention_t) _NOEXCEPT;
+__libcpp_atomic_wait(__cxx_atomic_contention_t const volatile*, __cxx_contention_t) noexcept;
# endif // !_LIBCPP_AVAILABILITY_HAS_NEW_SYNC
// new dylib interface
// return the global contention state's current value for the address
_LIBCPP_AVAILABILITY_NEW_SYNC _LIBCPP_EXPORTED_FROM_ABI __cxx_contention_t
-__atomic_monitor_global(void const* __address) _NOEXCEPT;
+__atomic_monitor_global(void const* __address) noexcept;
// wait on the global contention state to be changed from the given value for the address
_LIBCPP_AVAILABILITY_NEW_SYNC _LIBCPP_EXPORTED_FROM_ABI void
-__atomic_wait_global_table(void const* __address, __cxx_contention_t __monitor_value) _NOEXCEPT;
+__atomic_wait_global_table(void const* __address, __cxx_contention_t __monitor_value) noexcept;
// notify one waiter waiting on the global contention state for the address
-_LIBCPP_AVAILABILITY_NEW_SYNC _LIBCPP_EXPORTED_FROM_ABI void __atomic_notify_one_global_table(void const*) _NOEXCEPT;
+_LIBCPP_AVAILABILITY_NEW_SYNC _LIBCPP_EXPORTED_FROM_ABI void __atomic_notify_one_global_table(void const*) noexcept;
// notify all waiters waiting on the global contention state for the address
-_LIBCPP_AVAILABILITY_NEW_SYNC _LIBCPP_EXPORTED_FROM_ABI void __atomic_notify_all_global_table(void const*) _NOEXCEPT;
+_LIBCPP_AVAILABILITY_NEW_SYNC _LIBCPP_EXPORTED_FROM_ABI void __atomic_notify_all_global_table(void const*) noexcept;
// wait on the address directly with the native platform wait
template <std::size_t _Size>
_LIBCPP_AVAILABILITY_NEW_SYNC _LIBCPP_EXPORTED_FROM_ABI void
-__atomic_wait_native(void const* __address, void const* __old_value) _NOEXCEPT;
+__atomic_wait_native(void const* __address, void const* __old_value) noexcept;
// notify one waiter waiting on the address directly with the native platform wait
template <std::size_t _Size>
-_LIBCPP_AVAILABILITY_NEW_SYNC _LIBCPP_EXPORTED_FROM_ABI void __atomic_notify_one_native(const void*) _NOEXCEPT;
+_LIBCPP_AVAILABILITY_NEW_SYNC _LIBCPP_EXPORTED_FROM_ABI void __atomic_notify_one_native(const void*) noexcept;
// notify all waiters waiting on the address directly with the native platform wait
template <std::size_t _Size>
-_LIBCPP_AVAILABILITY_NEW_SYNC _LIBCPP_EXPORTED_FROM_ABI void __atomic_notify_all_native(const void*) _NOEXCEPT;
+_LIBCPP_AVAILABILITY_NEW_SYNC _LIBCPP_EXPORTED_FROM_ABI void __atomic_notify_all_native(const void*) noexcept;
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
diff --git a/libcxx/include/__atomic/atomic_sync_timed.h b/libcxx/include/__atomic/atomic_sync_timed.h
index 4fed3bf53f688..cd6c179c910b7 100644
--- a/libcxx/include/__atomic/atomic_sync_timed.h
+++ b/libcxx/include/__atomic/atomic_sync_timed.h
@@ -33,16 +33,16 @@ _LIBCPP_BEGIN_NAMESPACE_STD
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_AVAILABILITY_NEW_SYNC
-_LIBCPP_EXPORTED_FROM_ABI __cxx_contention_t __atomic_monitor_global(void const* __address) _NOEXCEPT;
+_LIBCPP_EXPORTED_FROM_ABI __cxx_contention_t __atomic_monitor_global(void const* __address) noexcept;
// wait on the global contention state to be changed from the given value for the address
_LIBCPP_AVAILABILITY_NEW_SYNC _LIBCPP_EXPORTED_FROM_ABI void __atomic_wait_global_table_with_timeout(
- void const* __address, __cxx_contention_t __monitor_value, uint64_t __timeout_ns) _NOEXCEPT;
+ void const* __address, __cxx_contention_t __monitor_value, uint64_t __timeout_ns) noexcept;
// wait on the address directly with the native platform wait
template <std::size_t _Size>
_LIBCPP_AVAILABILITY_NEW_SYNC _LIBCPP_EXPORTED_FROM_ABI void
-__atomic_wait_native_with_timeout(void const* __address, void const* __old_value, uint64_t __timeout_ns) _NOEXCEPT;
+__atomic_wait_native_with_timeout(void const* __address, void const* __old_value, uint64_t __timeout_ns) noexcept;
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
template <class _AtomicWaitable, class _Poll, class _Rep, class _Period>
diff --git a/libcxx/include/__cmath/lerp.h b/libcxx/include/__cmath/lerp.h
index 4cbbcc570fb83..01a7ec1402fb4 100644
--- a/libcxx/include/__cmath/lerp.h
+++ b/libcxx/include/__cmath/lerp.h
@@ -36,15 +36,15 @@ _LIBCPP_HIDE_FROM_ABI constexpr _Fp __lerp(_Fp __a, _Fp __b, _Fp __t) noexcept {
return __x < __b ? __x : __b;
}
-_LIBCPP_HIDE_FROM_ABI inline constexpr float lerp(float __a, float __b, float __t) _NOEXCEPT {
+_LIBCPP_HIDE_FROM_ABI inline constexpr float lerp(float __a, float __b, float __t) noexcept {
return __lerp(__a, __b, __t);
}
-_LIBCPP_HIDE_FROM_ABI inline constexpr double lerp(double __a, double __b, double __t) _NOEXCEPT {
+_LIBCPP_HIDE_FROM_ABI inline constexpr double lerp(double __a, double __b, double __t) noexcept {
return __lerp(__a, __b, __t);
}
-_LIBCPP_HIDE_FROM_ABI inline constexpr long double lerp(long double __a, long double __b, long double __t) _NOEXCEPT {
+_LIBCPP_HIDE_FROM_ABI inline constexpr long double lerp(long double __a, long double __b, long double __t) noexcept {
return __lerp(__a, __b, __t);
}
diff --git a/libcxx/include/__fwd/tuple.h b/libcxx/include/__fwd/tuple.h
index dc96c03e2024f..d9126d7be9e78 100644
--- a/libcxx/include/__fwd/tuple.h
+++ b/libcxx/include/__fwd/tuple.h
@@ -45,19 +45,19 @@ struct tuple_size;
template <size_t _Ip, class... _Tp>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 typename tuple_element<_Ip, tuple<_Tp...> >::type&
-get(tuple<_Tp...>&) _NOEXCEPT;
+get(tuple<_Tp...>&) noexcept;
template <size_t _Ip, class... _Tp>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const typename tuple_element<_Ip, tuple<_Tp...> >::type&
-get(const tuple<_Tp...>&) _NOEXCEPT;
+get(const tuple<_Tp...>&) noexcept;
template <size_t _Ip, class... _Tp>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 typename tuple_element<_Ip, tuple<_Tp...> >::type&&
-get(tuple<_Tp...>&&) _NOEXCEPT;
+get(tuple<_Tp...>&&) noexcept;
template <size_t _Ip, class... _Tp>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const typename tuple_element<_Ip, tuple<_Tp...> >::type&&
-get(const tuple<_Tp...>&&) _NOEXCEPT;
+get(const tuple<_Tp...>&&) noexcept;
#endif // _LIBCPP_CXX03_LANG
diff --git a/libcxx/include/__type_traits/integral_constant.h b/libcxx/include/__type_traits/integral_constant.h
index 5eb6dae898595..3b3a6db84869b 100644
--- a/libcxx/include/__type_traits/integral_constant.h
+++ b/libcxx/include/__type_traits/integral_constant.h
@@ -24,7 +24,7 @@ struct _LIBCPP_NO_SPECIALIZATIONS integral_constant {
typedef integral_constant type;
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR operator value_type() const _NOEXCEPT { return value; }
#if _LIBCPP_STD_VER >= 14
- [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI constexpr value_type operator()() const _NOEXCEPT { return value; }
+ [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI constexpr value_type operator()() const noexcept { return value; }
#endif
};
diff --git a/libcxx/include/initializer_list b/libcxx/include/initializer_list
index 9f0f824f0bd64..059ededebec3a 100644
--- a/libcxx/include/initializer_list
+++ b/libcxx/include/initializer_list
@@ -62,9 +62,8 @@ class _LIBCPP_NO_SPECIALIZATIONS initializer_list {
const _Ep* __begin_;
size_t __size_;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 initializer_list(const _Ep* __b, size_t __s) _NOEXCEPT
- : __begin_(__b),
- __size_(__s) {}
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 initializer_list(const _Ep* __b, size_t __s) noexcept
+ : __begin_(__b), __size_(__s) {}
public:
typedef _Ep value_type;
@@ -75,25 +74,23 @@ public:
typedef const _Ep* iterator;
typedef const _Ep* const_iterator;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 initializer_list() _NOEXCEPT : __begin_(nullptr), __size_(0) {}
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 initializer_list() noexcept : __begin_(nullptr), __size_(0) {}
[[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const _Ep* data() const noexcept {
return __begin_;
}
- [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 size_t size() const _NOEXCEPT {
- return __size_;
- }
+ [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 size_t size() const noexcept { return __size_; }
[[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 bool empty() const noexcept {
return __size_ == 0;
}
- [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const _Ep* begin() const _NOEXCEPT {
+ [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const _Ep* begin() const noexcept {
return __begin_;
}
- [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const _Ep* end() const _NOEXCEPT {
+ [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const _Ep* end() const noexcept {
return __begin_ + __size_;
}
};
diff --git a/libcxx/include/scoped_allocator b/libcxx/include/scoped_allocator
index 92d91f146dd0c..db02db91cec0a 100644
--- a/libcxx/include/scoped_allocator
+++ b/libcxx/include/scoped_allocator
@@ -213,43 +213,39 @@ private:
inner_allocator_type __inner_;
protected:
- _LIBCPP_HIDE_FROM_ABI __scoped_allocator_storage() _NOEXCEPT {}
+ _LIBCPP_HIDE_FROM_ABI __scoped_allocator_storage() noexcept {}
template <class _OuterA2, __enable_if_t<is_constructible<outer_allocator_type, _OuterA2>::value, int> = 0>
_LIBCPP_HIDE_FROM_ABI
- __scoped_allocator_storage(_OuterA2&& __outer_alloc, const _InnerAllocs&... __inner_allocs) _NOEXCEPT
- : outer_allocator_type(std::forward<_OuterA2>(__outer_alloc)),
- __inner_(__inner_allocs...) {}
+ __scoped_allocator_storage(_OuterA2&& __outer_alloc, const _InnerAllocs&... __inner_allocs) noexcept
+ : outer_allocator_type(std::forward<_OuterA2>(__outer_alloc)), __inner_(__inner_allocs...) {}
template <class _OuterA2, __enable_if_t<is_constructible<outer_allocator_type, const _OuterA2&>::value, int> = 0>
_LIBCPP_HIDE_FROM_ABI
- __scoped_allocator_storage(const __scoped_allocator_storage<_OuterA2, _InnerAllocs...>& __other) _NOEXCEPT
- : outer_allocator_type(__other.outer_allocator()),
- __inner_(__other.inner_allocator()) {}
+ __scoped_allocator_storage(const __scoped_allocator_storage<_OuterA2, _InnerAllocs...>& __other) noexcept
+ : outer_allocator_type(__other.outer_allocator()), __inner_(__other.inner_allocator()) {}
template <class _OuterA2, __enable_if_t<is_constructible<outer_allocator_type, _OuterA2>::value, int> = 0>
_LIBCPP_HIDE_FROM_ABI
- __scoped_allocator_storage(__scoped_allocator_storage<_OuterA2, _InnerAllocs...>&& __other) _NOEXCEPT
- : outer_allocator_type(std::move(__other.outer_allocator())),
- __inner_(std::move(__other.inner_allocator())) {}
+ __scoped_allocator_storage(__scoped_allocator_storage<_OuterA2, _InnerAllocs...>&& __other) noexcept
+ : outer_allocator_type(std::move(__other.outer_allocator())), __inner_(std::move(__other.inner_allocator())) {}
template <class _OuterA2, __enable_if_t<is_constructible<outer_allocator_type, _OuterA2>::value, int> = 0>
- _LIBCPP_HIDE_FROM_ABI __scoped_allocator_storage(_OuterA2&& __o, const inner_allocator_type& __i) _NOEXCEPT
- : outer_allocator_type(std::forward<_OuterA2>(__o)),
- __inner_(__i) {}
+ _LIBCPP_HIDE_FROM_ABI __scoped_allocator_storage(_OuterA2&& __o, const inner_allocator_type& __i) noexcept
+ : outer_allocator_type(std::forward<_OuterA2>(__o)), __inner_(__i) {}
- _LIBCPP_HIDE_FROM_ABI inner_allocator_type& inner_allocator() _NOEXCEPT { return __inner_; }
- _LIBCPP_HIDE_FROM_ABI const inner_allocator_type& inner_allocator() const _NOEXCEPT { return __inner_; }
+ _LIBCPP_HIDE_FROM_ABI inner_allocator_type& inner_allocator() noexcept { return __inner_; }
+ _LIBCPP_HIDE_FROM_ABI const inner_allocator_type& inner_allocator() const noexcept { return __inner_; }
- _LIBCPP_HIDE_FROM_ABI outer_allocator_type& outer_allocator() _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI outer_allocator_type& outer_allocator() noexcept {
return static_cast<outer_allocator_type&>(*this);
}
- _LIBCPP_HIDE_FROM_ABI const outer_allocator_type& outer_allocator() const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI const outer_allocator_type& outer_allocator() const noexcept {
return static_cast<const outer_allocator_type&>(*this);
}
scoped_allocator_adaptor<outer_allocator_type, _InnerAllocs...> _LIBCPP_HIDE_FROM_ABI
- select_on_container_copy_construction() const _NOEXCEPT {
+ select_on_container_copy_construction() const noexcept {
return scoped_allocator_adaptor<outer_allocator_type, _InnerAllocs...>(
allocator_traits<outer_allocator_type>::select_on_container_copy_construction(outer_allocator()),
allocator_traits<inner_allocator_type>::select_on_container_copy_construction(inner_allocator()));
@@ -266,41 +262,41 @@ class __scoped_allocator_storage<_OuterAlloc> : public _OuterAlloc {
protected:
typedef scoped_allocator_adaptor<_OuterAlloc> inner_allocator_type;
- _LIBCPP_HIDE_FROM_ABI __scoped_allocator_storage() _NOEXCEPT {}
+ _LIBCPP_HIDE_FROM_ABI __scoped_allocator_storage() noexcept {}
template <class _OuterA2, __enable_if_t<is_constructible<outer_allocator_type, _OuterA2>::value, int> = 0>
- _LIBCPP_HIDE_FROM_ABI __scoped_allocator_storage(_OuterA2&& __outer_alloc) _NOEXCEPT
+ _LIBCPP_HIDE_FROM_ABI __scoped_allocator_storage(_OuterA2&& __outer_alloc) noexcept
: outer_allocator_type(std::forward<_OuterA2>(__outer_alloc)) {}
template <class _OuterA2, __enable_if_t<is_constructible<outer_allocator_type, const _OuterA2&>::value, int> = 0>
- _LIBCPP_HIDE_FROM_ABI __scoped_allocator_storage(const __scoped_allocator_storage<_OuterA2>& __other) _NOEXCEPT
+ _LIBCPP_HIDE_FROM_ABI __scoped_allocator_storage(const __scoped_allocator_storage<_OuterA2>& __other) noexcept
: outer_allocator_type(__other.outer_allocator()) {}
template <class _OuterA2, __enable_if_t<is_constructible<outer_allocator_type, _OuterA2>::value, int> = 0>
- _LIBCPP_HIDE_FROM_ABI __scoped_allocator_storage(__scoped_allocator_storage<_OuterA2>&& __other) _NOEXCEPT
+ _LIBCPP_HIDE_FROM_ABI __scoped_allocator_storage(__scoped_allocator_storage<_OuterA2>&& __other) noexcept
: outer_allocator_type(std::move(__other.outer_allocator())) {}
- _LIBCPP_HIDE_FROM_ABI inner_allocator_type& inner_allocator() _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI inner_allocator_type& inner_allocator() noexcept {
return static_cast<inner_allocator_type&>(*this);
}
- _LIBCPP_HIDE_FROM_ABI const inner_allocator_type& inner_allocator() const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI const inner_allocator_type& inner_allocator() const noexcept {
return static_cast<const inner_allocator_type&>(*this);
}
- _LIBCPP_HIDE_FROM_ABI outer_allocator_type& outer_allocator() _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI outer_allocator_type& outer_allocator() noexcept {
return static_cast<outer_allocator_type&>(*this);
}
- _LIBCPP_HIDE_FROM_ABI const outer_allocator_type& outer_allocator() const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI const outer_allocator_type& outer_allocator() const noexcept {
return static_cast<const outer_allocator_type&>(*this);
}
_LIBCPP_HIDE_FROM_ABI scoped_allocator_adaptor<outer_allocator_type>
- select_on_container_copy_construction() const _NOEXCEPT {
+ select_on_container_copy_construction() const noexcept {
return scoped_allocator_adaptor<outer_allocator_type>(
allocator_traits<outer_allocator_type>::select_on_container_copy_construction(outer_allocator()));
}
- __scoped_allocator_storage(const outer_allocator_type& __o, const inner_allocator_type& __i) _NOEXCEPT;
+ __scoped_allocator_storage(const outer_allocator_type& __o, const inner_allocator_type& __i) noexcept;
template <class...>
friend class __scoped_allocator_storage;
@@ -321,14 +317,14 @@ struct __has_outer_allocator
template <class _Alloc, bool = __has_outer_allocator<_Alloc>::value>
struct __outermost {
typedef _Alloc type;
- _LIBCPP_HIDE_FROM_ABI type& operator()(type& __a) const _NOEXCEPT { return __a; }
+ _LIBCPP_HIDE_FROM_ABI type& operator()(type& __a) const noexcept { return __a; }
};
template <class _Alloc>
struct __outermost<_Alloc, true> {
typedef __libcpp_remove_reference_t< decltype(std::declval<_Alloc>().outer_allocator()) > _OuterAlloc;
typedef typename __outermost<_OuterAlloc>::type type;
- _LIBCPP_HIDE_FROM_ABI type& operator()(_Alloc& __a) const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI type& operator()(_Alloc& __a) const noexcept {
return __outermost<_OuterAlloc>()(__a.outer_allocator());
}
};
@@ -363,36 +359,35 @@ public:
typedef scoped_allocator_adaptor< typename _OuterTraits::template rebind_alloc<_Tp>, _InnerAllocs... > other;
};
- _LIBCPP_HIDE_FROM_ABI scoped_allocator_adaptor() _NOEXCEPT {}
+ _LIBCPP_HIDE_FROM_ABI scoped_allocator_adaptor() noexcept {}
template <class _OuterA2, __enable_if_t<is_constructible<outer_allocator_type, _OuterA2>::value, int> = 0>
_LIBCPP_HIDE_FROM_ABI
- scoped_allocator_adaptor(_OuterA2&& __outer_alloc, const _InnerAllocs&... __inner_allocs) _NOEXCEPT
+ scoped_allocator_adaptor(_OuterA2&& __outer_alloc, const _InnerAllocs&... __inner_allocs) noexcept
: _Base(std::forward<_OuterA2>(__outer_alloc), __inner_allocs...) {}
// scoped_allocator_adaptor(const scoped_allocator_adaptor& __other) = default;
template <class _OuterA2, __enable_if_t<is_constructible<outer_allocator_type, const _OuterA2&>::value, int> = 0>
_LIBCPP_HIDE_FROM_ABI
- scoped_allocator_adaptor(const scoped_allocator_adaptor<_OuterA2, _InnerAllocs...>& __other) _NOEXCEPT
+ scoped_allocator_adaptor(const scoped_allocator_adaptor<_OuterA2, _InnerAllocs...>& __other) noexcept
: _Base(__other) {}
template <class _OuterA2, __enable_if_t<is_constructible<outer_allocator_type, _OuterA2>::value, int> = 0>
- _LIBCPP_HIDE_FROM_ABI
- scoped_allocator_adaptor(scoped_allocator_adaptor<_OuterA2, _InnerAllocs...>&& __other) _NOEXCEPT
+ _LIBCPP_HIDE_FROM_ABI scoped_allocator_adaptor(scoped_allocator_adaptor<_OuterA2, _InnerAllocs...>&& __other) noexcept
: _Base(std::move(__other)) {}
// scoped_allocator_adaptor& operator=(const scoped_allocator_adaptor&) = default;
// scoped_allocator_adaptor& operator=(scoped_allocator_adaptor&&) = default;
// ~scoped_allocator_adaptor() = default;
- [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI inner_allocator_type& inner_allocator() _NOEXCEPT {
+ [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI inner_allocator_type& inner_allocator() noexcept {
return _Base::inner_allocator();
}
- [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI const inner_allocator_type& inner_allocator() const _NOEXCEPT {
+ [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI const inner_allocator_type& inner_allocator() const noexcept {
return _Base::inner_allocator();
}
- [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI outer_allocator_type& outer_allocator() _NOEXCEPT {
+ [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI outer_allocator_type& outer_allocator() noexcept {
return _Base::outer_allocator();
}
- [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI const outer_allocator_type& outer_allocator() const _NOEXCEPT {
+ [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI const outer_allocator_type& outer_allocator() const noexcept {
return _Base::outer_allocator();
}
@@ -403,7 +398,7 @@ public:
return allocator_traits<outer_allocator_type>::allocate(outer_allocator(), __n, __hint);
}
- _LIBCPP_HIDE_FROM_ABI void deallocate(pointer __p, size_type __n) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI void deallocate(pointer __p, size_type __n) noexcept {
allocator_traits<outer_allocator_type>::deallocate(outer_allocator(), __p, __n);
}
@@ -478,13 +473,14 @@ public:
}
[[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI scoped_allocator_adaptor
- select_on_container_copy_construction() const _NOEXCEPT {
+ select_on_container_copy_construction() const noexcept {
return _Base::select_on_container_copy_construction();
}
private:
_LIBCPP_HIDE_FROM_ABI explicit scoped_allocator_adaptor(
- outer_allocator_type&& __o, inner_allocator_type&& __i) _NOEXCEPT : _Base(std::move(__o), std::move(__i)) {}
+ outer_allocator_type&& __o, inner_allocator_type&& __i) noexcept
+ : _Base(std::move(__o), std::move(__i)) {}
template <class _Tp, class... _Args>
_LIBCPP_HIDE_FROM_ABI void __construct(integral_constant<int, 0>, _Tp* __p, _Args&&... __args) {
@@ -537,14 +533,14 @@ scoped_allocator_adaptor(_OuterAlloc, _InnerAllocs...) -> scoped_allocator_adapt
template <class _OuterA1, class _OuterA2>
inline _LIBCPP_HIDE_FROM_ABI bool
-operator==(const scoped_allocator_adaptor<_OuterA1>& __a, const scoped_allocator_adaptor<_OuterA2>& __b) _NOEXCEPT {
+operator==(const scoped_allocator_adaptor<_OuterA1>& __a, const scoped_allocator_adaptor<_OuterA2>& __b) noexcept {
return __a.outer_allocator() == __b.outer_allocator();
}
template <class _OuterA1, class _OuterA2, class _InnerA0, class... _InnerAllocs>
inline _LIBCPP_HIDE_FROM_ABI bool
operator==(const scoped_allocator_adaptor<_OuterA1, _InnerA0, _InnerAllocs...>& __a,
- const scoped_allocator_adaptor<_OuterA2, _InnerA0, _InnerAllocs...>& __b) _NOEXCEPT {
+ const scoped_allocator_adaptor<_OuterA2, _InnerA0, _InnerAllocs...>& __b) noexcept {
return __a.outer_allocator() == __b.outer_allocator() && __a.inner_allocator() == __b.inner_allocator();
}
@@ -552,7 +548,7 @@ operator==(const scoped_allocator_adaptor<_OuterA1, _InnerA0, _InnerAllocs...>&
template <class _OuterA1, class _OuterA2, class... _InnerAllocs>
inline _LIBCPP_HIDE_FROM_ABI bool operator!=(const scoped_allocator_adaptor<_OuterA1, _InnerAllocs...>& __a,
- const scoped_allocator_adaptor<_OuterA2, _InnerAllocs...>& __b) _NOEXCEPT {
+ const scoped_allocator_adaptor<_OuterA2, _InnerAllocs...>& __b) noexcept {
return !(__a == __b);
}
diff --git a/libcxx/include/shared_mutex b/libcxx/include/shared_mutex
index 2dfcb4f26f9d2..3b196bf533b2c 100644
--- a/libcxx/include/shared_mutex
+++ b/libcxx/include/shared_mutex
@@ -307,16 +307,15 @@ private:
bool __owns_;
public:
- [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI shared_lock() _NOEXCEPT : __m_(nullptr), __owns_(false) {}
+ [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI shared_lock() noexcept : __m_(nullptr), __owns_(false) {}
[[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI explicit shared_lock(mutex_type& __m)
: __m_(std::addressof(__m)), __owns_(true) {
__m_->lock_shared();
}
- [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI shared_lock(mutex_type& __m, defer_lock_t) _NOEXCEPT
- : __m_(std::addressof(__m)),
- __owns_(false) {}
+ [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI shared_lock(mutex_type& __m, defer_lock_t) noexcept
+ : __m_(std::addressof(__m)), __owns_(false) {}
[[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI shared_lock(mutex_type& __m, try_to_lock_t)
: __m_(std::addressof(__m)), __owns_(__m.try_lock_shared()) {}
@@ -342,14 +341,13 @@ public:
shared_lock(shared_lock const&) = delete;
shared_lock& operator=(shared_lock const&) = delete;
- [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI shared_lock(shared_lock&& __u) _NOEXCEPT
- : __m_(__u.__m_),
- __owns_(__u.__owns_) {
+ [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI shared_lock(shared_lock&& __u) noexcept
+ : __m_(__u.__m_), __owns_(__u.__owns_) {
__u.__m_ = nullptr;
__u.__owns_ = false;
}
- _LIBCPP_HIDE_FROM_ABI shared_lock& operator=(shared_lock&& __u) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI shared_lock& operator=(shared_lock&& __u) noexcept {
if (this != std::addressof(__u))
shared_lock(std::move(__u)).swap(*this);
return *this;
@@ -364,12 +362,12 @@ public:
_LIBCPP_HIDE_FROM_ABI void unlock();
// Setters
- _LIBCPP_HIDE_FROM_ABI void swap(shared_lock& __u) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI void swap(shared_lock& __u) noexcept {
std::swap(__m_, __u.__m_);
std::swap(__owns_, __u.__owns_);
}
- _LIBCPP_HIDE_FROM_ABI mutex_type* release() _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI mutex_type* release() noexcept {
mutex_type* __m = __m_;
__m_ = nullptr;
__owns_ = false;
@@ -377,11 +375,11 @@ public:
}
// Getters
- [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI bool owns_lock() const _NOEXCEPT { return __owns_; }
+ [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI bool owns_lock() const noexcept { return __owns_; }
- _LIBCPP_HIDE_FROM_ABI explicit operator bool() const _NOEXCEPT { return __owns_; }
+ _LIBCPP_HIDE_FROM_ABI explicit operator bool() const noexcept { return __owns_; }
- [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI mutex_type* mutex() const _NOEXCEPT { return __m_; }
+ [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI mutex_type* mutex() const noexcept { return __m_; }
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(shared_lock);
@@ -436,7 +434,7 @@ void shared_lock<_Mutex>::unlock() {
}
template <class _Mutex>
-inline _LIBCPP_HIDE_FROM_ABI void swap(shared_lock<_Mutex>& __x, shared_lock<_Mutex>& __y) _NOEXCEPT {
+inline _LIBCPP_HIDE_FROM_ABI void swap(shared_lock<_Mutex>& __x, shared_lock<_Mutex>& __y) noexcept {
__x.swap(__y);
}
diff --git a/libcxx/include/tuple b/libcxx/include/tuple
index 01a8649b59fca..7de15da8fab84 100644
--- a/libcxx/include/tuple
+++ b/libcxx/include/tuple
@@ -413,8 +413,8 @@ public:
return 0;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Hp& get() _NOEXCEPT { return __value_; }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const _Hp& get() const _NOEXCEPT { return __value_; }
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Hp& get() noexcept { return __value_; }
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const _Hp& get() const noexcept { return __value_; }
};
template <size_t _Ip, class _Hp>
@@ -468,14 +468,14 @@ public:
return 0;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Hp& get() _NOEXCEPT { return static_cast<_Hp&>(*this); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const _Hp& get() const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Hp& get() noexcept { return static_cast<_Hp&>(*this); }
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const _Hp& get() const noexcept {
return static_cast<const _Hp&>(*this);
}
};
template <class... _Tp>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 void __swallow(_Tp&&...) _NOEXCEPT {}
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 void __swallow(_Tp&&...) noexcept {}
// __tuple_impl
@@ -558,16 +558,16 @@ class _LIBCPP_NO_SPECIALIZATIONS tuple {
_BaseT __base_;
template <size_t _Jp, class... _Up>
- friend _LIBCPP_CONSTEXPR_SINCE_CXX14 typename tuple_element<_Jp, tuple<_Up...> >::type& get(tuple<_Up...>&) _NOEXCEPT;
+ friend _LIBCPP_CONSTEXPR_SINCE_CXX14 typename tuple_element<_Jp, tuple<_Up...> >::type& get(tuple<_Up...>&) noexcept;
template <size_t _Jp, class... _Up>
friend _LIBCPP_CONSTEXPR_SINCE_CXX14 const typename tuple_element<_Jp, tuple<_Up...> >::type&
- get(const tuple<_Up...>&) _NOEXCEPT;
+ get(const tuple<_Up...>&) noexcept;
template <size_t _Jp, class... _Up>
friend _LIBCPP_CONSTEXPR_SINCE_CXX14 typename tuple_element<_Jp, tuple<_Up...> >::type&&
- get(tuple<_Up...>&&) _NOEXCEPT;
+ get(tuple<_Up...>&&) noexcept;
template <size_t _Jp, class... _Up>
friend _LIBCPP_CONSTEXPR_SINCE_CXX14 const typename tuple_element<_Jp, tuple<_Up...> >::type&&
- get(const tuple<_Up...>&&) _NOEXCEPT;
+ get(const tuple<_Up...>&&) noexcept;
public:
using __trivially_relocatable _LIBCPP_NODEBUG =
@@ -1005,16 +1005,16 @@ _LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Winvalid-specialization")
template <>
class tuple<> {
public:
- constexpr tuple() _NOEXCEPT = default;
+ constexpr tuple() noexcept = default;
template <class _Alloc>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 tuple(allocator_arg_t, const _Alloc&) _NOEXCEPT {}
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 tuple(allocator_arg_t, const _Alloc&) noexcept {}
template <class _Alloc>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 tuple(allocator_arg_t, const _Alloc&, const tuple&) _NOEXCEPT {}
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 tuple(allocator_arg_t, const _Alloc&, const tuple&) noexcept {}
template <class _Up>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 tuple(array<_Up, 0>) _NOEXCEPT {}
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 tuple(array<_Up, 0>) noexcept {}
template <class _Alloc, class _Up>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 tuple(allocator_arg_t, const _Alloc&, array<_Up, 0>) _NOEXCEPT {}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void swap(tuple&) _NOEXCEPT {}
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 tuple(allocator_arg_t, const _Alloc&, array<_Up, 0>) noexcept {}
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void swap(tuple&) noexcept {}
# if _LIBCPP_STD_VER >= 23
_LIBCPP_HIDE_FROM_ABI constexpr void swap(const tuple&) const noexcept {}
@@ -1083,7 +1083,7 @@ swap(const tuple<_Tp...>& __lhs,
template <size_t _Ip, class... _Tp>
[[__nodiscard__]] inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
typename tuple_element<_Ip, tuple<_Tp...> >::type&
-get(tuple<_Tp...>& __t) _NOEXCEPT {
+get(tuple<_Tp...>& __t) noexcept {
using type _LIBCPP_NODEBUG = typename tuple_element<_Ip, tuple<_Tp...> >::type;
return static_cast<__tuple_leaf<_Ip, type>&>(__t.__base_).get();
}
@@ -1091,7 +1091,7 @@ get(tuple<_Tp...>& __t) _NOEXCEPT {
template <size_t _Ip, class... _Tp>
[[__nodiscard__]] inline _LIBCPP_HIDE_FROM_ABI
_LIBCPP_CONSTEXPR_SINCE_CXX14 const typename tuple_element<_Ip, tuple<_Tp...> >::type&
-get(const tuple<_Tp...>& __t) _NOEXCEPT {
+get(const tuple<_Tp...>& __t) noexcept {
using type _LIBCPP_NODEBUG = typename tuple_element<_Ip, tuple<_Tp...> >::type;
return static_cast<const __tuple_leaf<_Ip, type>&>(__t.__base_).get();
}
@@ -1099,7 +1099,7 @@ get(const tuple<_Tp...>& __t) _NOEXCEPT {
template <size_t _Ip, class... _Tp>
[[__nodiscard__]] inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
typename tuple_element<_Ip, tuple<_Tp...> >::type&&
-get(tuple<_Tp...>&& __t) _NOEXCEPT {
+get(tuple<_Tp...>&& __t) noexcept {
using type _LIBCPP_NODEBUG = typename tuple_element<_Ip, tuple<_Tp...> >::type;
return static_cast<type&&>(static_cast<__tuple_leaf<_Ip, type>&&>(__t.__base_).get());
}
@@ -1107,7 +1107,7 @@ get(tuple<_Tp...>&& __t) _NOEXCEPT {
template <size_t _Ip, class... _Tp>
[[__nodiscard__]] inline _LIBCPP_HIDE_FROM_ABI
_LIBCPP_CONSTEXPR_SINCE_CXX14 const typename tuple_element<_Ip, tuple<_Tp...> >::type&&
-get(const tuple<_Tp...>&& __t) _NOEXCEPT {
+get(const tuple<_Tp...>&& __t) noexcept {
using type _LIBCPP_NODEBUG = typename tuple_element<_Ip, tuple<_Tp...> >::type;
return static_cast<const type&&>(static_cast<const __tuple_leaf<_Ip, type>&&>(__t.__base_).get());
}
@@ -1139,7 +1139,7 @@ template <class _T1, class... _Args>
// tie
template <class... _Tp>
-[[__nodiscard__]] inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 tuple<_Tp&...> tie(_Tp&... __t) _NOEXCEPT {
+[[__nodiscard__]] inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 tuple<_Tp&...> tie(_Tp&... __t) noexcept {
return tuple<_Tp&...>(__t...);
}
@@ -1151,7 +1151,7 @@ make_tuple(_Tp&&... __t) {
template <class... _Tp>
[[__nodiscard__]] inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 tuple<_Tp&&...>
-forward_as_tuple(_Tp&&... __t) _NOEXCEPT {
+forward_as_tuple(_Tp&&... __t) noexcept {
return tuple<_Tp&&...>(std::forward<_Tp>(__t)...);
}
diff --git a/libcxx/src/atomic.cpp b/libcxx/src/atomic.cpp
index 15e0692100341..c05940fb73157 100644
--- a/libcxx/src/atomic.cpp
+++ b/libcxx/src/atomic.cpp
@@ -469,7 +469,7 @@ __atomic_wait_global_table(void const* __location, __cxx_contention_t __old_valu
}
_LIBCPP_EXPORTED_FROM_ABI void __atomic_wait_global_table_with_timeout(
- void const* __location, __cxx_contention_t __old_value, uint64_t __timeout_ns) _NOEXCEPT {
+ void const* __location, __cxx_contention_t __old_value, uint64_t __timeout_ns) noexcept {
auto const __entry = __get_contention_state(__location);
__contention_wait<sizeof(__cxx_atomic_contention_t)>(
&__entry->__waiter_count_global, &__entry->__platform_state, &__old_value, __timeout_ns);
More information about the libcxx-commits
mailing list