This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]