
17 Jun
2011
17 Jun
'11
9:49 a.m.
On 17 June 2011 05:14, Gokulakannan Somasundaram
All it takes to implement the allocator support in most cases is a typedef.
That isn't true. Correctly supporting allocators is more difficult than normal memory management since they can use custom pointers and C++03 allocators were poorly specified. C++11 is a lot better in this regard, but support isn't wide spread enough. Supporting allocators also makes your templates more complicated, resulting in worse error message, longer compile times and an increased testing burden. It also reduces the code that you can separately compile, since things that weren't templates have to become templates in order to support allocators.