
"Jason Hise" <chaos@ezequal.com> wrote in message news:41ED8818.5050909@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