[Bug c++/82047] non-existent variable template used to initialize variable

2021-08-23 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82047 Jonathan Wakely changed: What|Removed |Added Resolution|--- |INVALID Status|NEW

[Bug c++/82047] non-existent variable template used to initialize variable

2021-08-23 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82047 Jonathan Wakely changed: What|Removed |Added Last reconfirmed|2017-08-31 00:00:00 |2021-8-23 --- Comment #8 from Jonathan

[Bug c++/82047] non-existent variable template used to initialize variable

2017-08-31 Thread ldionne.2 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82047 --- Comment #7 from Louis Dionne --- Then, I think there's another bug in GCC (or maybe just a QOI issue), since the following code compiles (wandbox[1]): template constexpr T v; template constexpr T v(888); struct S { constexpr S()

[Bug c++/82047] non-existent variable template used to initialize variable

2017-08-31 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82047 --- Comment #6 from Jonathan Wakely --- I don't think it does mandate that. I think I was wrong to say (in comment 1) that it's only a declaration. I believe it's a definition too.

[Bug c++/82047] non-existent variable template used to initialize variable

2017-08-31 Thread ldionne.2 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82047 Louis Dionne changed: What|Removed |Added CC||ldionne.2 at gmail dot com --- Comment #5

[Bug c++/82047] non-existent variable template used to initialize variable

2017-08-31 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82047 --- Comment #4 from Jonathan Wakely --- Because std::complex has a default constructor that initializes all its members. If you replace S with a type that leaves some members uninitialized when default-initialized, it fails: template struct S {}

[Bug c++/82047] non-existent variable template used to initialize variable

2017-08-31 Thread john at mcfarlane dot name
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82047 --- Comment #3 from John McFarlane --- This still happens when S has member variables. For example, if `S` is replaced with `std::complex`, then `v>` is `{0,0}`.

[Bug c++/82047] non-existent variable template used to initialize variable

2017-08-31 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82047 --- Comment #2 from Jonathan Wakely --- Actually I wonder if this is due to GCC implementing a solution for http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#253 The relevant rule is: "A constexpr specifier used in an object declarati

[Bug c++/82047] non-existent variable template used to initialize variable

2017-08-31 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82047 Jonathan Wakely changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|