[libcxx-commits] [libcxx] [libc++] Move allocator assertion into allocator_traits (PR #94750)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Fri Jun 14 08:08:56 PDT 2024


================
@@ -692,9 +692,7 @@ public:
   typedef void __remove_return_type;
 #endif
 
-  static_assert(is_same<allocator_type, __rebind_alloc<allocator_traits<allocator_type>, value_type> >::value,
-                "[allocator.requirements] states that rebinding an allocator to the same type should result in the "
-                "original allocator");
+  static_assert(__check_valid_allocator<allocator_type>::value);
----------------
ldionne wrote:

Move up near the `is_same` check? I think this can be done for some of the other containers too.

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


More information about the libcxx-commits mailing list