Boost logo

Boost Users :

Subject: [Boost-users] Binding operator <<
From: Archie14 (admin_at_[hidden])
Date: 2009-07-11 08:01:31


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


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net