Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Commit

Permalink
Rework static_assert conditions for atomic's trivially copyable requi…
Browse files Browse the repository at this point in the history
…rement
  • Loading branch information
wmaxey committed Sep 15, 2021
1 parent ef8d536 commit 3c22b51
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
5 changes: 0 additions & 5 deletions libcxx/include/atomic
Original file line number Diff line number Diff line change
Expand Up @@ -1053,11 +1053,6 @@ template <typename _Tp, int _Sco,
typename _Base = __cxx_atomic_base_impl<_Tp, _Sco> >
#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<Tp> 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) {}
Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/support/atomic/cxx_atomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<Tp> requires that 'Tp' be a trivially copyable type");
#endif
Expand Down Expand Up @@ -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<Tp> requires that 'Tp' be a trivially copyable type");
#endif
Expand Down

0 comments on commit 3c22b51

Please sign in to comment.