Boost logo

Boost :

Subject: Re: [boost] [function] function wrapping and exception safety recap
From: Emil Dotchevski (emil_at_[hidden])
Date: 2010-10-19 04:11:33


On Tue, Oct 19, 2010 at 12:34 AM, Domagoj Saric <dsaritz_at_[hidden]> wrote:
>
> "Emil Dotchevski" <emil_at_[hidden]> wrote in message
> news:AANLkTimenndg89tGkUepkP-5mizv_NtNEdh-DAkNG1Tv_at_mail.gmail.com...
>
> On Mon, Oct 11, 2010 at 7:49 AM, Domagoj Saric
> <domagoj.saric_at_[hidden]> wrote:
>>>
>>> What (de)coupling (and the related benefits) are you referring to? The
>>> ABI
>>> compatibility/stability and safe cross .DLL/.so passing arguments also
>>> used
>>> for the justification of the hardcoded dynamic deleter in shared_ptr or
>>> something else?
>>
>> Yes, that ability is a result of the reduced coupling. One of the main
>> objectives of boost::function is type erasure: being able to hold on
>> to functions without knowing their exact type, and the allocator
>> policy directly interfered with that.
>
> Just like in the case of shared_ptr, I still don't buy this argument...: why
> would replacing hardcoded dynamic behaviour with configurability through
> policies 'interfere' with type erasure?

Because function<T,A1> is not the same type as function<T,A2>.

Emil Dotchevski
Reverge Studios, Inc.
http://www.revergestudios.com/reblog/index.php?n=ReCode


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