https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80662
--- Comment #8 from Jonathan Wakely ---
FWIW the original example compiles now, but that's because
https://wg21.link/lwg1203 (implemented by r12-319 and in gcc 11.2 by r11-8369)
changed the return type to be a reference to the original stream, n
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80662
--- Comment #7 from Jonathan Wakely ---
EDG matches GCC with --g++ (which is what ICC uses) but in it's strict mode it
says they're ambiguous:
"s.C", line 13: error: more than one operator "<<" matches these operands:
function templa
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80662
--- Comment #6 from Andrew Pinski ---
(In reply to Jonathan Wakely from comment #5)
> Reduced thanks to K-ballo:
Hmm, clang compiles and gives:
member
While both GCC and ICC compiles and gives:
non-member
And MSVC rejects it with:
(15): erro
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80662
--- Comment #5 from Jonathan Wakely ---
Reduced thanks to K-ballo:
extern "C" int puts(const char*);
template
void operator<<(C&&, T const&) { puts("non-member"); }
struct my_stream {
template
void operator<<(T&&) { puts("member"); }
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80662
Jonathan Wakely changed:
What|Removed |Added
Component|libstdc++ |c++
--- Comment #4 from Jonathan Wakel