|
Boost Users : |
Subject: Re: [Boost-users] Binding operator <<
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-07-11 09:48:47
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
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