This is the mail archive of the
libstdc++@sourceware.cygnus.com
mailing list for the libstdc++ project.
Re: allocator_type typedef/typename ?
- To: Yotam Medini <ymedini at iil dot intel dot com>
- Subject: Re: allocator_type typedef/typename ?
- From: <llewelly at 198 dot dsl dot xmission dot com>
- Date: Sun, 12 Dec 1999 06:05:13 -0700 (MST)
- cc: stl at sgi dot com, genstl at graphics dot stanford dot edu, libstdc++ at sourceware dot cygnus dot com
On Sun, 12 Dec 1999, Yotam Medini wrote:
>
> Shouldn't an STL container Cntr have Cntr<...>::allocator_type
> defined as a typename.
I think so. It is mentioned in the standard. (23.2.1)
>
> For example SGI's deque has:
> // {
> template <class T, class Alloc = alloc, size_t BufSiz = 0>
> class deque {
> ...
> typedef simple_alloc<pointer, Alloc> map_allocator;
> typedef simple_alloc<value_type, Alloc> data_allocator;
> ...
> };
> // }
> But no 'allocator_type' definition as suggested by
> http://www.dinkumware.com/htm_cpl/deque.html#deque
>
> -- yotam
>
Well, I don't have SGI's STL, but libstdc++-v3 (from cvs) certainly has
dequeue<...>::allocator_type . I didn't look at the other containers,
but I would assume they have have Container<..>::allocator_type .