[Bug c++/95596] string literal wrong overload resolution (char* vs std::string)

2023-05-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95596 Andrew Pinski changed: What|Removed |Added CC||arthur.j.odwyer at gmail dot com --- Co

[Bug c++/95596] string literal wrong overload resolution (char* vs std::string)

2022-02-14 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95596 Andrew Pinski changed: What|Removed |Added CC||johnsen.david at siemens dot com --- Co

[Bug c++/95596] string literal wrong overload resolution (char* vs std::string)

2020-07-22 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95596 Jonathan Wakely changed: What|Removed |Added CC||zhonghao at pku dot org.cn --- Comment

[Bug c++/95596] string literal wrong overload resolution (char* vs std::string)

2020-07-22 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95596 --- Comment #5 from Jonathan Wakely --- Another one that G++ rejects: void f(char*); int &f(...); int &r = f("foo");

[Bug c++/95596] string literal wrong overload resolution (char* vs std::string)

2020-06-10 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95596 Marek Polacek changed: What|Removed |Added CC||mpolacek at gcc dot gnu.org --- Comment

[Bug c++/95596] string literal wrong overload resolution (char* vs std::string)

2020-06-09 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95596 --- Comment #3 from Jonathan Wakely --- gcc/cp/typeck.c does: if (cxx_dialect >= cxx11) pedwarn (loc, OPT_Wwrite_strings, "ISO C++ forbids converting a string constant to %qT", totype); else

[Bug c++/95596] string literal wrong overload resolution (char* vs std::string)

2020-06-09 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95596 Jonathan Wakely changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever confirmed|0

[Bug c++/95596] string literal wrong overload resolution (char* vs std::string)

2020-06-09 Thread bzsurr at protonmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95596 --- Comment #1 from bzsurr at protonmail dot com --- (In reply to bzsurr from comment #0) > Looking at the following code gcc calls the _char*_ overload, according to > the standard the string literal is of type const array of char, so the non > c