This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/26512] g++ doesn't recognize user-defined operator<<(ostream, const pair<int, double> &)
- From: "olaf dot dietsche at gfa-net dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Mar 2006 14:21:59 -0000
- Subject: [Bug c++/26512] g++ doesn't recognize user-defined operator<<(ostream, const pair<int, double> &)
- References: <bug-26512-12289@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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<int, double>::value_type, which is std::map<int,
double>::pair<int, double> 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<int, double> &)
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<int, struct A> &)
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