Boost logo

Boost :

From: Brian McNamara (lorgon_at_[hidden])
Date: 2004-02-19 14:47:25


On Thu, Feb 19, 2004 at 08:54:36PM +0200, Peter Dimov wrote:
> The bind() model of separate adaptation and invocation can handle the
> question of object lifetime better (const reference vs non-const reference
> is actually a distraction). Consider these two examples:

[ examples elided]

> In both cases, everything is pure const, no side effects, but the by-value
> vs by-reference difference is crucial.
>
> While the unified syntax of fc++ is quite appealing, there is no bind/call
> separation. Of course you could enable_if it to behave differently when one
> of the arguments is _ but I'm not sure whether this would be a good idea.

Wow, thanks much for this example! I found it very enlightening.

In conjunction with recent ideas posted by Fernando, I think I may see a
nice way to handle reference-issues in FC++ using boost::ref.

I need to think about it a little more, though. Will post more later.

-- 
-Brian McNamara (lorgon_at_[hidden])

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk