OSNews article about C++09 degenerates into C++ vs. D discussion

Bill Baxter wbaxter at gmail.com
Thu Nov 23 02:23:00 PST 2006


Sean Kelly wrote:
> Mike Capp wrote:

>> Dunno; I'd never argue otherwise. I've never found a need to implement 
>> a custom
>> allocator in C++ (especially STL allocators, which turned out to be a 
>> complete
>> waste of paper).
> 
> 
> STL allocators can be useful for adapting the containers to work with 
> shared memory.  And I created a debug allocator I use from time to time. 
>  But the complexity allocators add to container implementation is 
> significant, for arguably little return.

I ended up doing just that thing for a project once.
That is, I used STL custom allocators to allocate the memory from SGI's 
shmem shared memory pools.

It not at all fun, though.  Especially since the allocator comes at the 
very end of every parameter list.  So using allocators means you have to 
specify *all* the parameters of every STL container you use.

--bb



More information about the Digitalmars-d mailing list