
"Vladimir Prus" <ghost@cs.msu.su> wrote in message news:c5dpev$rrt$1@sea.gmane.org... [snip]
What I was saying is that bind uses non-const reference for operator(), so if you use:
bind(foo, _1)(i); bind( foo, _1 )(ci);
then it will work ok. In fact, first one compiles and the second one does not.
yep.
And, BTW, "foo(i)" compiles just fine too, so your 'proper_forward(i)' should compile too, but it does not.
yes, but there is a huge difference between compiling wrong code silentltly and rejecting ok code. The use of ref() nicely documents that an address is taken.
As for
bind(foo, i)(); bind(foo, ci)();
I don't have any opinion yet.
I guess I didn't know that I was "misusing" bind(). Anyway, I find it wrong that bind(foo,_1)(i) and bind(foo,i)() differs. br Thorsten