[libcxx-commits] [libcxx] [libcxx] Implementation of P1831R1 (PR #101439)

Josh Karns via libcxx-commits libcxx-commits at lists.llvm.org
Sun Aug 4 15:36:48 PDT 2024


================
@@ -131,6 +154,11 @@ struct __atomic_base // false
   __atomic_base(const __atomic_base&) = delete;
 };
 
+#if _LIBCPP_STD_VER >= 20
+#  undef _LIBCPP_REQUIRE_IS_ALWAYS_LOCK_FREE
+#  define _LIBCPP_REQUIRE_IS_ALWAYS_LOCK_FREE requires __base::is_always_lock_free
----------------
jkarns275 wrote:

You're right, that is a better idea. I will make that change.

Since this is gated to versions >= C++20, perhaps I should add a version gate as well e.g.  `_LIBCPP_REQUIRES_IN_CXX20`?

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


More information about the libcxx-commits mailing list