Boost logo

Boost :

From: Douglas Gregor (gregod_at_[hidden])
Date: 2003-03-03 20:23:40


On Monday 03 March 2003 05:03 pm, Marc Jacobs wrote:
> bind( &X::f, &x, _1 )( 6 ); // error!

You can't pass rvalues to boost::bind function objects, because of the
forwarding problem in C++. If you use this it should work:

  int i = 6;
  bind( &X::f, &x, _1 )( i );

There's a good description of the forwarding problem here:
  http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/papers/2002/n1385.htm

        Doug


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk