stl_vector.h?!? (Re: [libstdc++] PATCH: STL allocator cleanup, part 1)

Matt Austern austern@apple.com
Fri Dec 19 18:45:00 GMT 2003


On Dec 19, 2003, at 2:07 AM, Paolo Carlini wrote:

> Matt Austern wrote:
>
>> Thanks!  I've now checked in the changes to list, vector, deque, and 
>> the four hash containers.  I'll do vector<bool>, the four associative 
>> containers, and slist next.
>
> Great!
> Matt, it looks like there is something wrong with the stl_vector.h 
> changes... Running 'make check-performance' I get:

Whoops, sorry!  I forgot that 'make check' doesn't also run 'make 
check-performance'.

This is closely related to the question that Benjamin raised a couple 
days ago.  What I'll have to do is fiddle with allocator.cc: that file 
is using allocators with the old SGI-style interface, and I've removed 
support for that interface from vector<>.

And I didn't answer your question, Benjamin, but: the answer is yes.  
The nonstandard allocators should be written in terms of the standard 
interface.  My prejudice nowadays is that that should be a general 
rule, that extensions shouldn't be written in terms of private 
interfaces unless it's absolutely necessary.  In this case it isn't 
necessary.

			--Matt



More information about the Libstdc++ mailing list