re PR libstdc++/63322 (std::atomic<T> where T is not trivially copyable should be...
authorJonathan Wakely <jwakely@redhat.com>
Thu, 9 Oct 2014 18:17:23 +0000 (19:17 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Thu, 9 Oct 2014 18:17:23 +0000 (19:17 +0100)
PR libstdc++/63322
* include/std/atomic (atomic): Add assertion for trivially copyable.
* testsuite/29_atomics/atomic/60695.cc: Adjust line number.

From-SVN: r216046

libstdc++-v3/ChangeLog
libstdc++-v3/include/std/atomic
libstdc++-v3/testsuite/29_atomics/atomic/60695.cc

index cdf1fc693403bb984e4e1a685bcccdedede11cef..6b4444aa2c56a50944dee7f79f61d31e704e0fa5 100644 (file)
@@ -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
index be7d0be051a1090069efd65fb6ba1bc119e2ab16..85dc252bb46a6f7a8ae494595367255e8c49cc15 100644 (file)
@@ -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");
index 27c0c8f59a6bab0cf30b2930e8c329fa966776ca..10c5e3adcbeaebbdbc45185d40fc922eb99a7968 100644 (file)
@@ -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 }