This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/60867] std::atomic<std::unique_ptr<T>> should fail to compile since unique_ptr is not trivial to copy
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 17 Apr 2014 14:02:35 +0000
- Subject: [Bug libstdc++/60867] std::atomic<std::unique_ptr<T>> should fail to compile since unique_ptr is not trivial to copy
- Auto-submitted: auto-generated
- References: <bug-60867-4 at http dot gcc dot gnu dot org/bugzilla/>
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.