[Bug c++/95596] string literal wrong overload resolution (char* vs std::string)
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Jun 9 13:43:33 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95596
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
Last reconfirmed| |2020-06-09
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Confirmed. Even with -std=c++14 -pedantic-errors we still choose the wrong
overload (and then give an error that the conversion is not allowed).
There seems to be no way to disable the conversion from string literals to
char* that has been deprecated for years.
More information about the Gcc-bugs
mailing list