diff options
| author | Eric Fiselier <eric@efcs.ca> | 2015-12-15 00:32:21 +0000 |
|---|---|---|
| committer | Eric Fiselier <eric@efcs.ca> | 2015-12-15 00:32:21 +0000 |
| commit | 831c1129547c973c59ccb957ed9fe0cf74102477 (patch) | |
| tree | 0d8401a637def77e3c22c09f8a9f9a1d92c7da33 /libcxx/include/atomic | |
| parent | a386358c3697676d4fea4dd80fd6057793284c64 (diff) | |
| download | bcm5719-llvm-831c1129547c973c59ccb957ed9fe0cf74102477.tar.gz bcm5719-llvm-831c1129547c973c59ccb957ed9fe0cf74102477.zip | |
Fix various GCC mis-configurations for newer versions.
This patch goes through and enables C++11 and C++14 features for newer GCC's.
The main changes are:
1. Turn on variable templates. (Uses __cpp_variable_templates)
2. Assert atomic<Tp> is trivially copyable (Uses _GNUC_VER >= 501).
3. Turn on trailing return support for GCC. (Uses _GNUC_VER >= 404)
4. XFAIL void_t test for GCC 5.1 and 5.2. Fixed in GCC 6.
llvm-svn: 255585
Diffstat (limited to 'libcxx/include/atomic')
| -rw-r--r-- | libcxx/include/atomic | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libcxx/include/atomic b/libcxx/include/atomic index b5d5a27b041..abec2a0b565 100644 --- a/libcxx/include/atomic +++ b/libcxx/include/atomic @@ -552,6 +552,12 @@ typedef enum memory_order namespace __gcc_atomic { template <typename _Tp> struct __gcc_atomic_t { + +#if _GNUC_VER >= 501 + static_assert(is_trivially_copyable<_Tp>::value, + "std::atomic<Tp> requires that 'Tp' be a trivially copyable type"); +#endif + _LIBCPP_INLINE_VISIBILITY #ifndef _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS __gcc_atomic_t() _NOEXCEPT = default; |

