Boost logo

Boost Users :

From: Johan Torp (johan.torp_at_[hidden])
Date: 2006-10-05 08:12:47


Operator , (nullary composition) does not seem work between
boost::function and boost::lambda.
Is this a bug? Is there any way to work around this?

void foo() { std::cout << "foo"; }

boost::function<void()> f(boost::lambda::bind(&foo));
(f,f)(); // Outputs foo
(boost::lambda::bind(&foo),f)(); // Outputs foo
(f,boost::lambda::bind(&foo))(); // Outputs foo
(boost::lambda::bind(&foo), boost::lambda::bind(&foo))(); // Outputs foofoo

I am using boost 1.32 and gcc 3.4.4.

Best Regards, Johan Torp

-- 
System Developer
TouchTable AB
Tel: +46 (0)31 773 68 12
johan.torp_at_[hidden]

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