
Hi,
I'm trying to use thew BLL for the first time and I've the following
program:
class Date
{
public:
Date(long d): _lDate(d) {}
long getDate() const { return _lDate; }
[...]
private:
long _lDate;
};
std::ostream& operator<<(std::ostream &s, const Date &x)
{
[...]
}
struct C
{
C(long d): date(d) {}
Date date;
};
int main()
{
const C c(46000);
std::cout << boost::bind(&C::date, boost::lambda::_1)(c) << std::endl;
std::vector<C> cont(1, C(46000));
std::for_each(cont.begin(), cont.end(), std::cout <<
boost::bind(&C::date, boost::lambda::_1));
return 0;
}
The first std::cout is ok. But for the second one nested int the for_each I
get this message error:
error C2679: binary '<<' : no operator found which takes a right-hand
operand of type 'boost::_bi::bind_t