Boost logo

Boost :

Subject: Re: [boost] Interest in a "Heterogenous Container" system?
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2009-08-04 15:58:12


Christian Schladetsch wrote:

> This is largely what I did. The allocation model used by Cloneable is based
> on covariant virtual methods that are passed an 'abstract allocator' which
> takes the alignment as an argument.
>
> struct abstract_allocator
> {
> typedef char *pointer;
> virtual pointer allocate_bytes(size_t num_bytes, size_t
> alignment) = 0;
> virtual void deallocate_bytes(pointer, size_t alignment) = 0;
> static size_t calc_padding(pointer ptr, size_t alignment);
> };

Ok, I see.
But what gains does using a special container give?


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