
25 Oct
2005
25 Oct
'05
6:52 p.m.
On Oct 21, 2005, at 12:51 PM, Peter Dimov wrote:
Neal Becker wrote:
I'm using bind with boost-1.33. I can't get a simple test to work:
----------- #include <boost/bind.hpp>
int G (int a, int b, int c) { return a + b + c; }
int main () { int x = boost::bind (G,_1, 4, 8)(2); }
This is the "rvalue problem", boost::bind(...) won't take 2 as an argument. To get it to compile you need
int main() { int a = 2; int x = boost::bind (G,_1, 4, 8)(a); }
What "rvalue problem"?! Works for me! ;-) -Howard