[libcxx-commits] [libcxx] [libc++] Simplify a bunch of noexcept specifications (PR #166397)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Mon Nov 17 08:28:16 PST 2025


================
@@ -672,12 +668,10 @@ public:
     return *this;
   }
 
-  _LIBCPP_HIDE_FROM_ABI deque(deque&& __c) noexcept(is_nothrow_move_constructible<allocator_type>::value);
+  _LIBCPP_HIDE_FROM_ABI deque(deque&& __c) noexcept;
   _LIBCPP_HIDE_FROM_ABI deque(deque&& __c, const __type_identity_t<allocator_type>& __a);
   _LIBCPP_HIDE_FROM_ABI deque& operator=(deque&& __c) noexcept(
-      (__alloc_traits::propagate_on_container_move_assignment::value &&
-       is_nothrow_move_assignable<allocator_type>::value) ||
-      __alloc_traits::is_always_equal::value);
+      __alloc_traits::propagate_on_container_move_assignment::value || __alloc_traits::is_always_equal::value);
----------------
ldionne wrote:

You should probably use `libcxx/include/__memory/noexcept_move_assign_container.h` here? Although that one only checks `__alloc_traits::is_always_equal::value` in >= C++17. Let's figure out what we want to do here.

https://github.com/llvm/llvm-project/pull/166397


More information about the libcxx-commits mailing list