[Bug c++/85958] Make const qualifier error clear
tavianator at gmail dot com
gcc-bugzilla@gcc.gnu.org
Wed May 30 19:28:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85958
Tavian Barnes <tavianator at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tavianator at gmail dot com
--- Comment #4 from Tavian Barnes <tavianator at gmail dot com> ---
IMHO "discards qualifiers" and even "discards const qualifier" are still
confusing. Making it clearly counterfactual, as in "...would discard (const)
qualifier(s)...," would be an improvement.
But I'd further argue that "discarding qualifiers" is not really how most
people think of this kind of error. When a minor tries to get into a bar, they
are not told that "entering this bar discards your age," they are told that
"minors aren't allowed." So I think "cannot bind 'const int' to non-const
reference type 'int&'" would be more intuitive phrasing.
More information about the Gcc-bugs
mailing list