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 descriptio
While I've successfully used boost::bind before, I cannot seem to get this
simple test case to work.
#include
#include
using namespace boost;
using namespace std;
struct X
{
void f( int i )
{
cout << i << "\n";
}
};
int main( int argc, char * argv[] )
{
X x;
bind(