Boost logo

Boost :

From: Pavel Vozenilek (pavel_vozenilek_at_[hidden])
Date: 2005-01-18 17:53:07


"Jason Hise" wrote:

>I was thinking about the simpler standard containers... specifically
>vector, deque, and list, and wondering... would there be any value in
>making a generic linear_container class which uses policies to define the
>allocation and iteration methods? Specifically, I imagine something like
>this:
>
> typedef linear_container < contiguous_iterator, alloc_using_new > vector;
> typedef linear_container < double_linked_iterator, alloc_using_new > list;
> // etc...
>
> The iterator itself could probably be broken down into smaller traits, but
> the idea is that this would make it much easier to add new types of
> containers or mix and match existing functionality. Through the
> linear_container it would be easy to ensure that all types of containers
> had the same interface (push_back, pop_back, etc...) Thoughts/opinion?
>
Maybe Boost.Multi Index Container is what you are looking for.
/Pavel


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