Boost logo

Boost :

From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2005-01-18 18:55:42


"Jason Hise" <chaos_at_[hidden]> wrote in message
news:41ED8818.5050909_at_ezequal.com...
|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?

I believe the is a policy vector in the sandbox somewhere...I don't know why
it has not
ben submitted.

As for the idea of giving a vector like container push_front() etc, then I
think it
would be a bad idea because the complexity would be different.

br

-Thorsten


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