[Bug libstdc++/87855] std::optional only copy-constructible if T is trivially copy-constructible

2019-01-09 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87855 --- Comment #22 from Jonathan Wakely --- Author: redi Date: Wed Jan 9 10:17:10 2019 New Revision: 267759 URL: https://gcc.gnu.org/viewcvs?rev=267759&root=gcc&view=rev Log: PR libstdc++/87855 fix optional for types with non-trivial copy/move Ba

[Bug libstdc++/87855] std::optional only copy-constructible if T is trivially copy-constructible

2019-01-09 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87855 Jonathan Wakely changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug libstdc++/87855] std::optional only copy-constructible if T is trivially copy-constructible

2019-01-08 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87855 --- Comment #20 from Jonathan Wakely --- Fixed for GCC 9, but I might make the minimal fix on the gcc-8-branch.

[Bug libstdc++/87855] std::optional only copy-constructible if T is trivially copy-constructible

2019-01-08 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87855 --- Comment #19 from Jonathan Wakely --- Author: redi Date: Tue Jan 8 23:00:46 2019 New Revision: 267742 URL: https://gcc.gnu.org/viewcvs?rev=267742&root=gcc&view=rev Log: PR libstdc++/87855 fix optional for types with non-trivial copy/move Wh

[Bug libstdc++/87855] std::optional only copy-constructible if T is trivially copy-constructible

2019-01-08 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87855 Jonathan Wakely changed: What|Removed |Added Status|NEW |ASSIGNED --- Comment #18 from Jonathan

[Bug libstdc++/87855] std::optional only copy-constructible if T is trivially copy-constructible

2018-11-19 Thread ville at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87855 --- Comment #17 from ville at gcc dot gnu.org --- Author: ville Date: Mon Nov 19 15:05:18 2018 New Revision: 266278 URL: https://gcc.gnu.org/viewcvs?rev=266278&root=gcc&view=rev Log: PR libstdc++/87855 Also implement P0602R4 (variant and optiona

[Bug libstdc++/87855] std::optional only copy-constructible if T is trivially copy-constructible

2018-11-19 Thread ville.voutilainen at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87855 --- Comment #16 from Ville Voutilainen --- (In reply to Florian Weimer from comment #15) > (In reply to Ville Voutilainen from comment #13) > > Well, Jonathan found this http://lists.isocpp.org/core/2018/06/4643.php > > Would you please summariz

[Bug libstdc++/87855] std::optional only copy-constructible if T is trivially copy-constructible

2018-11-19 Thread fw at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87855 Florian Weimer changed: What|Removed |Added CC||fw at gcc dot gnu.org --- Comment #15 f

[Bug libstdc++/87855] std::optional only copy-constructible if T is trivially copy-constructible

2018-11-19 Thread ville.voutilainen at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87855 --- Comment #14 from Ville Voutilainen --- (In reply to fiesh from comment #12) > X(double) : X(X(42)) {} // clang doesn't like this > > is also enough to show the difference, no need for an operator. Yeah. The list-archive link that you probab

[Bug libstdc++/87855] std::optional only copy-constructible if T is trivially copy-constructible

2018-11-19 Thread ville.voutilainen at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87855 --- Comment #13 from Ville Voutilainen --- Well, Jonathan found this http://lists.isocpp.org/core/2018/06/4643.php

[Bug libstdc++/87855] std::optional only copy-constructible if T is trivially copy-constructible

2018-11-19 Thread fiesh at zefix dot tv
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87855 --- Comment #12 from fiesh at zefix dot tv --- X(double) : X(X(42)) {} // clang doesn't like this is also enough to show the difference, no need for an operator.

[Bug libstdc++/87855] std::optional only copy-constructible if T is trivially copy-constructible

2018-11-19 Thread ville.voutilainen at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87855 Ville Voutilainen changed: What|Removed |Added CC||jason at redhat dot com --- Comment

[Bug libstdc++/87855] std::optional only copy-constructible if T is trivially copy-constructible

2018-11-19 Thread ville.voutilainen at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87855 --- Comment #10 from Ville Voutilainen --- Here's another one where gcc and clang disagree: https://wandbox.org/permlink/UsViiOoDRgdismAy The disagreement is over X(bool b) : X((b, X(42))) {} where b is unused, gcc elides the temporary and clan

[Bug libstdc++/87855] std::optional only copy-constructible if T is trivially copy-constructible

2018-11-19 Thread ville.voutilainen at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87855 --- Comment #9 from Ville Voutilainen --- See https://wandbox.org/permlink/snAuT59ocie38DU5 Here's a tl;dr: struct NonTrivial {NonTrivial(const NonTrivial&) {}}; struct X { X() : x(42) {} X(bool b) : X(b ? X(42): X(666)) {} // clang doe

[Bug libstdc++/87855] std::optional only copy-constructible if T is trivially copy-constructible

2018-11-19 Thread ville.voutilainen at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87855 --- Comment #8 from Ville Voutilainen --- (In reply to Jonathan Wakely from comment #7) > (In reply to fiesh from comment #0) > > (If this is true, is it > > a separate gcc bug that it does not delete the union's constructor?) > > Yes, I think s

[Bug libstdc++/87855] std::optional only copy-constructible if T is trivially copy-constructible

2018-11-19 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87855 --- Comment #7 from Jonathan Wakely --- (In reply to fiesh from comment #0) > (If this is true, is it > a separate gcc bug that it does not delete the union's constructor?) Yes, I think so. Could you please file a Component=c++ bug too?

[Bug libstdc++/87855] std::optional only copy-constructible if T is trivially copy-constructible

2018-11-16 Thread fiesh at zefix dot tv
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87855 --- Comment #6 from fiesh at zefix dot tv --- Again, fixes the issue for me with clang!

[Bug libstdc++/87855] std::optional only copy-constructible if T is trivially copy-constructible

2018-11-15 Thread ville.voutilainen at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87855 --- Comment #5 from Ville Voutilainen --- New patch is at https://gcc.gnu.org/ml/gcc-patches/2018-11/msg01368.html

[Bug libstdc++/87855] std::optional only copy-constructible if T is trivially copy-constructible

2018-11-02 Thread fiesh at zefix dot tv
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87855 --- Comment #4 from fiesh at zefix dot tv --- Heh ok, you tricked me ;)

[Bug libstdc++/87855] std::optional only copy-constructible if T is trivially copy-constructible

2018-11-02 Thread ville.voutilainen at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87855 --- Comment #3 from Ville Voutilainen --- The fix is not quite right. I'll do a more intrusive one. Stay tuned.

[Bug libstdc++/87855] std::optional only copy-constructible if T is trivially copy-constructible

2018-11-02 Thread fiesh at zefix dot tv
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87855 --- Comment #2 from fiesh at zefix dot tv --- This fixes the problem. Thank you so much for your effort!

[Bug libstdc++/87855] std::optional only copy-constructible if T is trivially copy-constructible

2018-11-01 Thread ville.voutilainen at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87855 Ville Voutilainen changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|