allocator question, regarding pointer types
Benjamin Kosnik
bkoz@redhat.com
Thu Feb 12 01:54:00 GMT 2004
>However, in the stl code I've looked at (specifically, the stl headers
>that came with gcc 3.2), that typedef is not used, but instead I see:
>
> struct _List_node_base
> {
> _List_node_base* _M_next;
> _List_node_base* _M_prev;
> };
There are big changes between 3.2/3.3 and 3.4 sources WRT allocators.
The 3.4 sources are more in line with the standard.
>This seems (from my naive reading of std::allocator articles) to break
>the allocator design. i.e. I thought that if I wanted to create an
>allocator that can magically return a pointer of size 1 byte, that the
>typedef inside the allocator ( typedef char pointer; ) would be used
>in the container for the pointer type.
Please provide sources to what you are trying to do.
-benjamin
More information about the Libstdc++
mailing list