diff --git a/libcxx/include/atomic b/libcxx/include/atomic index e0bc08475a..1175474fd5 100644 --- a/libcxx/include/atomic +++ b/libcxx/include/atomic @@ -1053,11 +1053,6 @@ template > #endif //_LIBCUDACXX_ATOMIC_ONLY_USE_BUILTINS struct __cxx_atomic_impl : public _Base { -#if _GNUC_VER >= 501 - static_assert(is_trivially_copyable<_Tp>::value, - "std::atomic requires that 'Tp' be a trivially copyable type"); -#endif - __cxx_atomic_impl() _NOEXCEPT _LIBCUDACXX_DEFAULT _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR explicit __cxx_atomic_impl(_Tp value) _NOEXCEPT : _Base(value) {} diff --git a/libcxx/include/support/atomic/cxx_atomic.h b/libcxx/include/support/atomic/cxx_atomic.h index 4a3c12b9dd..077804b1a7 100644 --- a/libcxx/include/support/atomic/cxx_atomic.h +++ b/libcxx/include/support/atomic/cxx_atomic.h @@ -20,7 +20,7 @@ struct __cxx_atomic_base_impl { static constexpr int __sco = _Sco; -#if _GNUC_VER >= 501 +#if !defined(_GNUC_VER) || (defined(_GNUC_VER) && _GNUC_VER >= 501) static_assert(is_trivially_copyable<_Tp>::value, "std::atomic requires that 'Tp' be a trivially copyable type"); #endif @@ -83,7 +83,7 @@ struct __cxx_atomic_ref_base_impl { static constexpr int __sco = _Sco; -#if _GNUC_VER >= 501 +#if !defined(_GNUC_VER) || (defined(_GNUC_VER) && _GNUC_VER >= 501) static_assert(is_trivially_copyable<_Tp>::value, "std::atomic_ref requires that 'Tp' be a trivially copyable type"); #endif