Fix PR24114 - std::atomic for non-Clang is not a literal type
Add _LIBCPP_CONSTEXPR to the implementation of __gcc_atomic_t.
llvm-svn: 242172
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: 092c475e250af64e7b9ba459067d43cb71fb6dfd
diff --git a/include/atomic b/include/atomic
index 5bc71f0..97a998d 100644
--- a/include/atomic
+++ b/include/atomic
@@ -554,7 +554,8 @@
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>