21 Nov
2004
21 Nov
'04
10:56 p.m.
gast 128 wrote:
Ok I have an example,
int f(int, int); struct X { int m_i; };
X x; int i = boost::bind(&f, 1, _1)(boost::bind(&KTstbX::m_i, _1)(x)); UNREF(i);
I guess the new boost does not return ref for members (in react on a previous email).
Yes, you are right.
I don't quite see the point of the example, though... the inner bind is not
a nested bind expression. Is this an oversimplified version?
The problem is that bind( f, 1, _1 ) can't take an rvalue as a parameter.
This hasn't changed. It's just that the second bind now returns the member
by value by default.
If you are using a reasonably conforming compiler, you can use
bind