[Bug c++/97572] [c++ 20] Constraining is broken

2021-04-27 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97572 Jonathan Wakely changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug c++/97572] [c++ 20] Constraining is broken

2021-04-27 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97572 --- Comment #5 from Jonathan Wakely --- The diagnostic is different now and the "cannot convert 'T' to 'bool'" part is gone. For comment 0 we get: 97572.C: In substitution of 'template requires Any constexpr int f(auto:1) [with auto:1 = bool]

[Bug c++/97572] [c++ 20] Constraining is broken

2020-10-26 Thread dimitri.gorokhovik at free dot fr via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97572 --- Comment #4 from Dimitri Gorokhovik --- I probably cannot objectively tell anymore which one is better, since I just read the specification. However, subjectively, Clang's diagnostics: a) seems to have phrasing much closer to the spec, and

[Bug c++/97572] [c++ 20] Constraining is broken

2020-10-26 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97572 Jonathan Wakely changed: What|Removed |Added Keywords||diagnostic --- Comment #3 from Jonatha

[Bug c++/97572] [c++ 20] Constraining is broken

2020-10-26 Thread dimitri.gorokhovik at free dot fr via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97572 --- Comment #2 from Dimitri Gorokhovik --- Fair enough, passing a boolean by value into 'any()' is evaluation of local parameter 't', and that is prohibited (7.5.7.4/2). Doesn't this merit a better diagnostics though? A slightly modified code:

[Bug c++/97572] [c++ 20] Constraining is broken

2020-10-25 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97572 --- Comment #1 from Jonathan Wakely --- I think GCC is correct to reject this. any(t) is not a valid constraint.