On Fri, Jun 19, 2015 at 06:36:26AM -0700, Andrei Alexandrescu wrote: > On 6/19/15 4:51 AM, Ivan Timokhin wrote: > > 2. Only dynamic allocator customisation is supported (unlike C++ > > containers). Is > > this deliberate? > > Yes; I think C++'s approach to allocators didn't go over well, and part > of the problem (though not all) is that allocators are associated with > the type they allocate. > > Andrei
Disclaimer: my level of expertise in the field is approximately zero. Having said that, from what I've heard, it seems that indirection and virtual call cost can be quite noticeable with simple allocators (e.g. region allocator). Could we have an allocator template argument that would default to IAllocator, so that one gets all benefits of runtime binding by default, but still can get static binding if it is required?
