Fix PR24114 - std::atomic for non-Clang is not a literal type

Add _LIBCPP_CONSTEXPR to the implementation of __gcc_atomic_t.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@242172 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Fiselier
2015-07-14 17:50:27 +00:00
parent 119ed47999
commit 26edd804ba
2 changed files with 58 additions and 1 deletions

View File

@@ -554,7 +554,8 @@ namespace __gcc_atomic {
template <typename _Tp>
struct __gcc_atomic_t {
__gcc_atomic_t() _NOEXCEPT {}
explicit __gcc_atomic_t(_Tp value) _NOEXCEPT : __a_value(value) {}
_LIBCPP_CONSTEXPR explicit __gcc_atomic_t(_Tp value) _NOEXCEPT
: __a_value(value) {}
_Tp __a_value;
};
#define _Atomic(x) __gcc_atomic::__gcc_atomic_t<x>