11 Jul
2009
11 Jul
'09
1:48 p.m.
AMDG Archie14 wrote:
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; }
http://www.boost.org/libs/bind/bind.html#err_overloaded In Christ, Steven Watanabe