[Bug c++/26512] New: g++ doesn't recognize user-defined operator<<(ostream, const pair
d:/programme/mingw/include/c++/4.0.2/bits/ostream.tcc:616: note: std::basic_ostream& std::operator<<(std::basic_ostream&, const char*) [with _Traits = std::char_traits] d:/programme/mingw/include/c++/4.0.2/ostream:497: note: std::basic_ostream& std::operator<<(std::basic_ostream&, const signed char*) [with _Traits = std::char_traits] d:/programme/mingw/include/c++/4.0.2/ostream:502: note: std::basic_ostream& std::operator<<(std::basic_ostream&, const unsigned char*) [with _Traits = std::char_traits] -- Summary: g++ doesn't recognize user-defined operator<<(ostream, const pair &) Product: gcc Version: 4.0.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: olaf dot dietsche at gfa-net dot de http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26512
[Bug c++/26512] g++ doesn't recognize user-defined operator<<(ostream, const pair
--- Comment #1 from olaf dot dietsche at gfa-net dot de 2006-03-01 14:35 --- Created an attachment (id=10946) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10946&action=view) Preprocessed gccbug.cpp -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26512
[Bug c++/26512] g++ doesn't recognize user-defined operator<<(ostream, const pair
--- Comment #4 from olaf dot dietsche at gfa-net dot de 2006-03-03 22:57 --- I looked at your link and at issue 197. I don't see how this applies to my bug report, especially in connection with _user defined_ types. What I don't understand is, why does g++ handle builtin types different than user defined types. e.g: operator<<(ostream, const pair &) vs. operator<<(ostream, const pair &) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26512
[Bug c++/26512] g++ doesn't recognize user-defined operator<<(ostream, const pair
--- Comment #6 from olaf dot dietsche at gfa-net dot de 2006-03-05 14:21 --- Sorry, if my example wasn't clear enough :-(. I'll try to clarify. M::value_type is std::map::value_type, which is std::map::pair in my first example. g++ doesn't recognize the user defined operator <<(std::ostream &f, const M::value_type &), which is operator<<(ostream &, const pair &) If I change double to struct A, g++ _does_ recognize the user defined operator <<(std::ostream &f, const M::value_type &), which is - in my second example - operator<<(ostream, const pair &) And this is my problem: the difference in ignoring the user defined operator<<() in the first case and recognizing the user defined operator<<() in the second case. I hope, this makes my problem a bit more understandable. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26512
[Bug c++/26512] g++ doesn't recognize user-defined operator<<(ostream, const pair
--- Comment #8 from olaf dot dietsche at gfa-net dot de 2006-03-05 16:22 --- Which doesn't make this inconsistent behaviour any better. I don't know Comeau C++, is it some sort of reference implementation? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26512