Boost logo

Boost Users :

Subject: [Boost-users] [bind][factory] Nested binds with functional/factory
From: Rutger ter Borg (rutger_at_[hidden])
Date: 2009-03-12 04:37:23


Dear all,

I'm trying to use boost::bind in combination with
boost/functional/factory.hpp (and value_factory)

this works fine,

boost::bind( boost::factory<T*>(), arg1, _1 )

with arg1 not being an lvalue (e.g., 2.0).

however, with nested binds it is not accepted,

boost::bind( boost::factory<T*>(), boost::bind( f, _1 ), _2 )

the compiler complains that it needs an lvalue for the nested bind. Is this
desired behaviour? Is there some trick around this?

Many thanks,
Kind regards,

Rutger ter Borg


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