I know I have done this before successfully on some compiler -- maybe
it was MSVC 7 or g++ 2.95.

Presently, the g++ 3.2 compiler is complaining that it cannot find
operator<<(ostream, std::pair<string,string>). However, it is present
and I can call it. So why does not g++ see it when compiling std::copy?
Thanks,
Siegfried

ostream operator<<(ostream os, const std::pair<string,string>& x){
return os << x.first<<x.second; }

std::map<string,string>m; m[(string)"hello"] = (string)"there";
std::copy(m.begin(), m.end(), ostream_iterator<std::pair<string,string>
>(cout));

_______________________________________________
help-gplusplus mailing list
help-gplusplus@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gplusplus

Reply via email to