[Bug libstdc++/60867] std::atomic<std::unique_ptr<T>> should fail to compile since unique_ptr is not trivial to copy

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Apr 17 14:02:00 GMT 2014


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60867

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID
           Severity|normal                      |enhancement

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
The standard does not require a diagnostic here, the error is in your code not
the library.

However, I put the following in std::atomic two days ago:

  // TODO: static_assert(is_trivially_copyable<_Tp>::value, "");

As soon as we have a working implementation of is_trivially_copyable that can
be enabled.



More information about the Gcc-bugs mailing list