Boost logo

Boost :

From: E. Gladyshev (egladysh_at_[hidden])
Date: 2003-09-02 12:21:47


--- David Abrahams <dave_at_[hidden]> wrote:
[...]
> Something like:
>
> some_allocator<_1>
>
> or
>
> struct select_allocator
> {
> template <class T>
> struct apply
> {
> typedef some_allocator<T> type;
> };
> };
>
> with some_allocator's interface being like what's required for
> std::allocator but not including misplaced interface bits such as
> address/construct/destroy, and possibly max_size -- these can be added
> by a std::allocator facade wrapper if neccessary.
>
> I'm not sure we need a simple version and a complicated version.
>

I suggested something similar in one of my prev. posts here.

template< typename T >
struct generate_allocator
{
   typedef some_allocator<T> type;
};

Eugene

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com


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