[Bug c++/97572] [c++ 20] Constraining is broken
dimitri.gorokhovik at free dot fr
gcc-bugzilla@gcc.gnu.org
Mon Oct 26 12:22:23 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97572
--- Comment #4 from Dimitri Gorokhovik <dimitri.gorokhovik at free dot fr> ---
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
b) contains less misleading information:
-- the champion here is GCC's "error: cannot convert ‘T’ to ‘bool’" -- whereas
'T' *is*, in fact, 'bool'. (Note that this msg also has a status of a full
error in its own right, not just a note.)
-- arguably, a close contender is "error: ‘t’ is not a constant expression".
Understanding how it can happen was hard to me. 't' looks as constant as they
get with requires-local-parameters (I mean, constexpr-ness of a local-parameter
here should be understood as coming only from its declaration shouldn't it?).
The (S s) form of requires-local-var is a common form, so when the compiler
says 's' is not a constant expression' here, how would it be constant in other
situations?
More information about the Gcc-bugs
mailing list