Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2003-08-30 06:58:41


Aleksey Gurtovoy <agurtovoy_at_[hidden]> writes:

> E. Gladyshev wrote:
>> > * Consider parametrization, especialy if your library is to be available
>> > for embedded or non-traditional (like DSP, etc.) platfroms.
>>
>> I think this item will make you think twice before hiding
>> boost::signal's allocator.
>
> An allocator parameter is not the only way to parameterize, here, nor it is
> necessarily the most appropriate one. If I wanted to manage how
> function/signals allocate their memory, I wouldn't want to do it on a
> per-object basis - which, without the typedef templates, is pretty much the
> only level the allocator template parameter would allow me to manage it on.
> At least for these two libraries, a per-project parameterization seems more
> appropriate to the real needs, and something as simple as a trait class
> could provide the means.

?? Because of its rebind<...>, allocators *are* essentially poor man's
typedef templates (i.e. metafunction classes)...

but that's just one more thing that makes me dislike them, since they
are generally passed about by value and stored they are fulfilling
two roles.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

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