public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug libstdc++/60867] std::atomic<std::unique_ptr<T>> should fail to compile since unique_ptr is not trivial to copy [not found] <bug-60867-4@http.gcc.gnu.org/bugzilla/> @ 2014-04-17 14:02 ` redi at gcc dot gnu.org 2014-04-17 14:06 ` kjell.hedstrom at logrhythm dot com 1 sibling, 0 replies; 2+ messages in thread From: redi at gcc dot gnu.org @ 2014-04-17 14:02 UTC (permalink / raw) To: gcc-bugs 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. ^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug libstdc++/60867] std::atomic<std::unique_ptr<T>> should fail to compile since unique_ptr is not trivial to copy [not found] <bug-60867-4@http.gcc.gnu.org/bugzilla/> 2014-04-17 14:02 ` [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 @ 2014-04-17 14:06 ` kjell.hedstrom at logrhythm dot com 1 sibling, 0 replies; 2+ messages in thread From: kjell.hedstrom at logrhythm dot com @ 2014-04-17 14:06 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60867 --- Comment #2 from Kjell Hedstrom <kjell.hedstrom at logrhythm dot com> --- Sounds good. >> the error is in your code not the library Yes. Code like that is obviously faulty. I am happy that you are considering putting in a static_assert. From a coders perspective I find it very helpful if the compiler would immediately find bugs of this nature. Cheers Kjell ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-04-17 14:06 UTC | newest] Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <bug-60867-4@http.gcc.gnu.org/bugzilla/> 2014-04-17 14:02 ` [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 2014-04-17 14:06 ` kjell.hedstrom at logrhythm dot com
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).