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

Mark de Wever via libcxx-commits libcxx-commits at lists.llvm.org
Sun Aug 4 03:34:40 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
----------------
mordante wrote:

I really dislike this, it makes it very hard to determine what the macro `_LIBCPP_REQUIRE_IS_ALWAYS_LOCK_FREE` is defined to. 

In the `__config` header we have some macros to conditionally do things, for example `__NOEXCEPT_(...)`. There is no `_LIBCPP_REQUIRES(...)` since there was no need for that macro. Can you add that macro for this patch?

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


More information about the libcxx-commits mailing list