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

A. Jiang via libcxx-commits libcxx-commits at lists.llvm.org
Tue Dec 17 17:16:19 PST 2024


================
@@ -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
----------------
frederick-vs-ja wrote:

Formerly, libc++ (and other standard library implementations) backported `is_always_equal` and its friend to old modes. Is it desired to limit its effects to C++17 and later?

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


More information about the libcxx-commits mailing list