Boost logo

Boost :

From: Jesse Jones (jesjones_at_[hidden])
Date: 2000-11-25 19:05:18

>In message <200011242142.NAA23521_at_[hidden]>, Jesse Jones
><jesjones_at_[hidden]> writes
>>Evidently I wasn't making myself clear enough. What you were suggesting
>>was that callback would be non-copyable and clients would have to use
>>shared_ptr<callback> if they wanted a copyable version. All that I'm
>>saying is that callbacks are copied sufficently often that I'd prefer to
>>make callback itself copyable.
>Ah, I guess I wasn't making myself clear enough, so we may have been
>talking at cross purposes. I never said that callbacks weren't or might
>not be copyable; quite the opposite in fact. I have assumed that
>callbacks must be copy assignable and copy constructible. I am
>supporting the view that internally for implementation they would use
>cloning. I was only proposing shared_ptr for cases where people
>genuinely wanted/needed to share a given callback instance, eg to avoid

Oh :-) Either cloning or ref counting is fine by me, but cloning is
probably better since it deals more gracefully with function objects with
mutable state.

  -- Jesse

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