[libcxx-commits] [libcxx] [libc++] Implement C++20 atomic_ref (PR #76647)
via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Feb 7 03:20:42 PST 2024
================
@@ -27,6 +30,21 @@
_LIBCPP_BEGIN_NAMESPACE_STD
+template <class _Tp>
+struct __is_cxx_atomic_impl : false_type {};
+
+template <class _Tp>
+struct __is_cxx_atomic_impl<__cxx_atomic_impl<_Tp> > : true_type {};
+
+template <class _Tp>
+_LIBCPP_HIDE_FROM_ABI __enable_if_t<!__is_cxx_atomic_impl<__remove_cv_t<_Tp> >::value, _Tp>
+__cxx_atomic_load(_Tp* __ptr, memory_order __order) _NOEXCEPT {
----------------
huixie90 wrote:
I think this is workaround for the `cxx_atomic_wait` not working? to be honest, I think this is making this header even more complicated. I would rather do it properly
https://github.com/llvm/llvm-project/pull/76647
More information about the libcxx-commits
mailing list