[Bug c++/96645] [9/10/11/12 Regression] std::variant default constructor

2021-11-23 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96645

--- Comment #13 from Jonathan Wakely  ---
Tim Song says "This is another variant of CWG2335, which is currently blocked
on implementation experience and wording."

[Bug c++/96645] [9/10/11/12 Regression] std::variant default constructor

2021-09-06 Thread eyalroz1 at gmx dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96645

Eyal Rozenberg  changed:

   What|Removed |Added

 CC||eyalroz1 at gmx dot com

--- Comment #12 from Eyal Rozenberg  ---
(In reply to Jason Merrill from comment #8)
> We cannot correctly resolve is_nothrow_constructible until we've parsed
> the DMI.  Given that, we have three options:
> 
> 1) Conservatively say no.
> 2) Optimistically guess yes.
> 3) Non-SFINAE error.
>
> ("We" in this sentence is the C++ standard.)

But in this page, "we" is the compiler. IIUC, the standard does not allow for
determing is_nothrow_constructible. Am I correct? If that really is the
case, shouldn't the compiler emit an error saying that?

Alternatively, when not following the standard strictly, why should it not be
option (4.): Ignore the official restriction on determining (nothrow)
constructibility, make a best-effort attempt to determine it anyway ( which in
this example should succeed), and report failure otherwise.

?

> PR81359 changed our behavior from 3 to 1.

I searched that bug page for the rationale, and couldn't quite get it.

[Bug c++/96645] [9/10/11/12 Regression] std::variant default constructor

2021-06-01 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96645

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|9.4 |9.5

--- Comment #11 from Richard Biener  ---
GCC 9.4 is being released, retargeting bugs to GCC 9.5.