[libcxx-commits] [libcxx] [libc++] cv-qualified types in atomic and atomic_ref (P3323R1) (PR #121414)

Damien L-G via libcxx-commits libcxx-commits at lists.llvm.org
Thu Jan 2 06:02:04 PST 2025


================
@@ -19,27 +19,49 @@
 #include "test_helper.h"
 #include "test_macros.h"
 
-template <typename T>
+template <typename T, typename U>
+concept has_store = requires { std::declval<T>().store(std::declval<U>()); };
+
+template <typename U>
 struct TestStore {
   void operator()() const {
+    static_assert(has_store<std::atomic_ref<U>, U>);
+    do_test<U>();
+    do_test_atomic<U>();
+    static_assert(!has_store<std::atomic_ref<U const>, U>);
----------------
dalg24 wrote:

Oh I see.  Yes I intended to do that after we converge on the few tests that I already updated.

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


More information about the libcxx-commits mailing list