11 Jul
2009
11 Jul
'09
12:01 p.m.
Can't figure out the proper sintax for binding <<. class A { public: friend std::ostream& operator << (std::ostream& stream, A& a); }; class B : boost::ptr_vector<A> { public: friend std::ostream& operator << (std::ostream& stream, B& b); } std::ostream& operator << (std::ostream& stream, B& b) { std::for_each(begin(), end(), boost::bind(&operator<<, ref(stream), ref(_1)); ??? return stream; }