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

Benjamin Kosnik bkoz@redhat.com
Fri Dec 19 20:00:00 GMT 2003


>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.

Great. I think this makes the most sense too. I think these changes,
when finished, will substantially reduce confusion in user-land. Yay!

>When I give these allocators standard interfaces, I'd like to change 
>their names too.  Would anyone object to names like debug_allocator, 
>pool_allocator, mt_allocator, new_allocator, and malloc_allocator?

Nope! In my proposed patch I already did this for new_allocator. I'm up
for this (although, as a nit, I wish we had better names for
pool_allocator and mt_allocator. Maybe single_pool_allocator and
multi_pool_allocator. That's getting to be kind of a mouthful though.)

I'll work on converting these  much the way new_allocator was done.

-benjamin



More information about the Libstdc++ mailing list