work on g++ 3.2?
On g++ 3.2 it keeps telling me that there is no such function operator <<
for ostream and pair<string,string>. But there is!
And I can call it! And it works! So why cannot std::copy find it?
thanks,
Siegfried
template<typename K, typename V>
ostream& operator<<(ostream& os, std::pair<K,V>& p){ return os << p.first <<
p.second; }
std::map<string,string> m; m[(string)"hello"] = (string)"there";
std::copy(m.begin(), m.end(), ostream_iterator<std::pair<string,string>
(cout, ",");