https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97572
Jonathan Wakely changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|---
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]
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
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97572
Jonathan Wakely changed:
What|Removed |Added
Keywords||diagnostic
--- Comment #3 from Jonatha
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:
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.