diff options
author | redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-10-09 18:17:23 +0000 |
---|---|---|
committer | redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-10-09 18:17:23 +0000 |
commit | 4953a073a26f94a3c52dc630e869463548465ffe (patch) | |
tree | e561e58677a5953802a34f55c7e557c3c5af318c /libstdc++-v3 | |
parent | 9ccbea7e5cc6cd7bff820b0c10dc54c46bca66fd (diff) | |
download | gcc-4953a073a26f94a3c52dc630e869463548465ffe.tar.gz |
PR libstdc++/63322
* include/std/atomic (atomic): Add assertion for trivially copyable.
* testsuite/29_atomics/atomic/60695.cc: Adjust line number.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216046 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3')
-rw-r--r-- | libstdc++-v3/ChangeLog | 4 | ||||
-rw-r--r-- | libstdc++-v3/include/std/atomic | 3 | ||||
-rw-r--r-- | libstdc++-v3/testsuite/29_atomics/atomic/60695.cc | 2 |
3 files changed, 7 insertions, 2 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index cdf1fc69340..6b4444aa2c5 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -3,6 +3,10 @@ * doc/xml/manual/status_cxx2011.xml: Update. * doc/html/manual/status.html: Regenerate. + PR libstdc++/63322 + * include/std/atomic (atomic): Add assertion for trivially copyable. + * testsuite/29_atomics/atomic/60695.cc: Adjust line number. + 2014-10-09 Ville Voutilainen <ville.voutilainen@gmail.com> PR libstdc++/60132 diff --git a/libstdc++-v3/include/std/atomic b/libstdc++-v3/include/std/atomic index be7d0be051a..85dc252bb46 100644 --- a/libstdc++-v3/include/std/atomic +++ b/libstdc++-v3/include/std/atomic @@ -163,7 +163,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION private: _Tp _M_i; - // TODO: static_assert(is_trivially_copyable<_Tp>::value, ""); + static_assert(__is_trivially_copyable(_Tp), + "std::atomic requires a trivially copyable type"); static_assert(sizeof(_Tp) > 0, "Incomplete or zero-sized types are not supported"); diff --git a/libstdc++-v3/testsuite/29_atomics/atomic/60695.cc b/libstdc++-v3/testsuite/29_atomics/atomic/60695.cc index 27c0c8f59a6..10c5e3adcbe 100644 --- a/libstdc++-v3/testsuite/29_atomics/atomic/60695.cc +++ b/libstdc++-v3/testsuite/29_atomics/atomic/60695.cc @@ -27,4 +27,4 @@ struct X { char stuff[0]; // GNU extension, type has zero size }; -std::atomic<X> a; // { dg-error "not supported" "" { target *-*-* } 168 } +std::atomic<X> a; // { dg-error "not supported" "" { target *-*-* } 169 } |