|
Boost Users : |
From: Markus Werle (yg-boost-users_at_[hidden])
Date: 2003-02-10 15:32:23
Douglas Gregor wrote:
> On Monday 10 February 2003 12:29 pm, Markus Werle wrote:
>> > You can pass a "reference" to those algorithms by changing 'f'
>> > parameters to:
>> > boost::bind(ref(f), _1, _2)
>>
>> Do I need this only in the outermost binding level
>> (I have nested boost::functions) or do I have to
>> apply "ref" also to the original (true, existent) functions
>> at the leaves of the functor tree?
>
> You only need this at the outermost binding level.
OK.
Q: I am pretty unsure about dangling references.
My function object creator functions return
boost::functions by value (and collect these form others).
If the root function object creator wraps its stuff
in a cref: does boost lib take care for the lifetime of the
object? How does this work?
Markus
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net