
15 Feb
2006
15 Feb
'06
6:02 p.m.
-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Me here Sent: Wednesday, February 15, 2006 10:24 AM To: boost@lists.boost.org Subject: [boost] Binding function call to an assignment
I want to make a binder to do an assignment like:
------ example ------ #include "boost/bind.hpp"
int main() { int X = 0;
boost::bind<int&>(X, _1)( 1 );
return 0; } --- end ---
You could use lambda: #include <boost/lambda/lambda.hpp> int main() { int X = 0; const int y = 1; namespace ll = boost::lambda; (ll::var(X) = ll::_1)(y) return 0; } Brock