File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -230,8 +230,14 @@ struct __atomic_waitable_traits<__atomic_base<_Tp, _IsIntegral> > {
230230 }
231231};
232232
233+ template <typename _Tp>
234+ struct __check_atomic_mandates {
235+ using type = _Tp;
236+ static_assert (is_trivially_copyable<_Tp>::value, " std::atomic<T> requires that 'T' be a trivially copyable type" );
237+ };
238+
233239template <class _Tp >
234- struct atomic : public __atomic_base <_Tp> {
240+ struct atomic : public __atomic_base <typename __check_atomic_mandates< _Tp>::type > {
235241 using __base _LIBCPP_NODEBUG = __atomic_base<_Tp>;
236242
237243#if _LIBCPP_STD_VER >= 20
Original file line number Diff line number Diff line change 111111
112112_LIBCPP_BEGIN_NAMESPACE_STD
113113
114- template <typename _Tp>
115- struct __check_atomic_mandates {
116- using type = _Tp;
117- static_assert (is_trivially_copyable<_Tp>::value, " std::atomic<T> requires that 'T' be a trivially copyable type" );
118- };
119-
120- template <typename _Tp, typename _Base = __cxx_atomic_base_impl<typename __check_atomic_mandates<_Tp>::type> >
114+ template <typename _Tp, typename _Base = __cxx_atomic_base_impl<_Tp> >
121115struct __cxx_atomic_impl : public _Base {
122116 _LIBCPP_HIDE_FROM_ABI __cxx_atomic_impl () _NOEXCEPT = default;
123117 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR explicit __cxx_atomic_impl (_Tp __value) _NOEXCEPT : _Base(__value) {}
You can’t perform that action at this time.
0 commit comments