This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/26512] g++ doesn't recognize user-defined operator<<(ostream, const pair<int, double> &)



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]