Boost logo

Boost :

From: brianjparker_at_[hidden]
Date: 2001-10-20 02:06:16


--- In boost_at_y..., "Peter Dimov" <pdimov_at_m...> wrote:
> One thing that I don't understand from the code is: doesn't passing
a
> temporary to your bind() lead to a dangling reference? Remember
that you can
> assign the bind() result to boost::function, which will outlive the
> temporaries.

Yes, I was focussing on using the bound function within a single
expression. If the aim is to copy the bound function between
statements (or even potentially returned from functions) then I would
tend to agree that having bind store a local copy of the arguments is
probably a better default.

,Brian Parker


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