[libcxx-commits] [libcxx] [libc++] Improve diagnostic when violating `std::atomic` trivially copyable mandates (PR #131754)
Damien L-G via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Mar 18 01:30:15 PDT 2025
================
@@ -111,10 +111,14 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-template <typename _Tp, typename _Base = __cxx_atomic_base_impl<_Tp> >
-struct __cxx_atomic_impl : public _Base {
+template <typename _Tp>
+struct __check_atomic_mandates {
+ using type = _Tp;
static_assert(is_trivially_copyable<_Tp>::value, "std::atomic<T> requires that 'T' be a trivially copyable type");
----------------
dalg24 wrote:
Fine by me
https://github.com/llvm/llvm-project/pull/131754
More information about the libcxx-commits
mailing list