Boost logo

Boost :

From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2004-04-12 05:28:43

"Vladimir Prus" <ghost_at_[hidden]> wrote in message
> 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.


> 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
bind(foo,_1)(i) and bind(foo,i)() differs.



Boost list run by bdawes at, gregod at, cpdaniel at, john at