parent
0f74c51841
commit
406775bdf4
3 changed files with 8 additions and 6 deletions
|
|
@ -19,6 +19,7 @@
|
|||
#include <__cxx03/__type_traits/is_floating_point.h>
|
||||
#include <__cxx03/__type_traits/is_function.h>
|
||||
#include <__cxx03/__type_traits/is_same.h>
|
||||
#include <__cxx03/__type_traits/is_trivially_copyable.h>
|
||||
#include <__cxx03/__type_traits/remove_const.h>
|
||||
#include <__cxx03/__type_traits/remove_pointer.h>
|
||||
#include <__cxx03/__type_traits/remove_volatile.h>
|
||||
|
|
@ -32,8 +33,14 @@
|
|||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
template <typename _Tp>
|
||||
struct __check_atomic_mandates {
|
||||
using type _LIBCPP_NODEBUG = _Tp;
|
||||
static_assert(is_trivially_copyable<_Tp>::value, "std::atomic<T> requires that 'T' be a trivially copyable type");
|
||||
};
|
||||
|
||||
template <class _Tp>
|
||||
struct atomic : public __atomic_base<_Tp> {
|
||||
struct atomic : public __atomic_base<typename __check_atomic_mandates<_Tp>::type> {
|
||||
using __base = __atomic_base<_Tp>;
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI atomic() _NOEXCEPT = default;
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@
|
|||
#include <__cxx03/__config>
|
||||
#include <__cxx03/__memory/addressof.h>
|
||||
#include <__cxx03/__type_traits/is_assignable.h>
|
||||
#include <__cxx03/__type_traits/is_trivially_copyable.h>
|
||||
#include <__cxx03/__type_traits/remove_const.h>
|
||||
#include <__cxx03/cstddef>
|
||||
|
||||
|
|
@ -487,8 +486,6 @@ __cxx_atomic_fetch_xor(__cxx_atomic_base_impl<_Tp>* __a, _Tp __pattern, memory_o
|
|||
|
||||
template <typename _Tp, typename _Base = __cxx_atomic_base_impl<_Tp> >
|
||||
struct __cxx_atomic_impl : public _Base {
|
||||
static_assert(is_trivially_copyable<_Tp>::value, "std::atomic<T> requires that 'T' be a trivially copyable type");
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI __cxx_atomic_impl() _NOEXCEPT = default;
|
||||
_LIBCPP_HIDE_FROM_ABI explicit __cxx_atomic_impl(_Tp __value) _NOEXCEPT : _Base(__value) {}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -6,8 +6,6 @@
|
|||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// XFAIL: FROZEN-CXX03-HEADERS-FIXME
|
||||
|
||||
// <atomic>
|
||||
|
||||
// template <class T>
|
||||
|
|
|
|||
Loading…
Reference in a new issue