[Bug libstdc++/58924] Non-member invocation of overload of operator<< when the first argument is a temporary of type std::stringstream

sir_nawaz959 at yahoo dot com gcc-bugzilla@gcc.gnu.org
Wed Oct 30 13:55:00 GMT 2013


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58924

--- Comment #5 from Sarfaraz Nawaz <sir_nawaz959 at yahoo dot com> ---
(In reply to Fanael from comment #1)
> That's expected behavior AFAIU. 'operator<<(basic_ostream<charT, traits>&&
> os, const T& x)' is a better match for const char[K] than
> 'basic_ostream<charT,traits>& basic_ostream<charT,traits>::operator<<(const
> void* p)', hence the former gets called, which then forwards the arguments
> to 'operator<<(basic_ostream<charT, traits>&& os, const charT* x)'.


Oh. I didn't come across this overload. Great that they've added this.

Invalid bug.



More information about the Gcc-bugs mailing list