Proposal for std::vector.
Dhruv Matani
dhruvbird@gmx.net
Fri Feb 6 12:37:00 GMT 2004
The relevant discussion can be found by searching google for:
About std::vector and standard containers in general.
Wierd as it may seem, are standard containers such as std::vector
allowed
to derive from std::allocator, or more generally from an allocator
class?
Mainly used to make use of EBO in case of an empty allocator such as
new_allocator and malloc_allocator.
I liked a solution that one poster mentioned about having an IMPL class
within vector. So something like this:
template <T, A>
class vector {
template <_A>
struct IMPL : public _A {
_M_start, _M_finish, etc...
};
};
What do you think about it? Can it be merged with the library?
--
-Dhruv Matani.
http://www.geocities.com/dhruvbird/
More information about the Libstdc++
mailing list