[libcxx-commits] [libcxx] [libc++] Implement N4258(Cleaning-up noexcept in the Library) (PR #120312)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jan 8 09:07:43 PST 2025


================
@@ -772,9 +772,16 @@ public:
 
   _LIBCPP_HIDE_FROM_ABI __hash_table& operator=(const __hash_table& __u);
   _LIBCPP_HIDE_FROM_ABI __hash_table& operator=(__hash_table&& __u)
-      _NOEXCEPT_(__node_traits::propagate_on_container_move_assignment::value&&
-                     is_nothrow_move_assignable<__node_allocator>::value&& is_nothrow_move_assignable<hasher>::value&&
-                         is_nothrow_move_assignable<key_equal>::value);
+#ifndef _LIBCPP_CXX03_LANG
+      noexcept(is_nothrow_move_assignable<hasher>::value && is_nothrow_move_assignable<key_equal>::value &&
+               ((__node_traits::propagate_on_container_move_assignment::value &&
+                 is_nothrow_move_assignable<__node_allocator>::value)
+#  if _LIBCPP_STD_VER >= 17
+                || allocator_traits<__node_allocator>::is_always_equal::value
+#  endif
----------------
ldionne wrote:

Did we implement the rest of n4258 in all modes? I expect we probably did. If that's correct, then I would also backport this part of n4258 to all modes, otherwise I wouldn't.

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


More information about the libcxx-commits mailing list