Re:C++ Internals: STL Vector, Part 3
by AdieuToLogic on Monday August 10, 2015 @12:36AM
(#10032673)
Using a custom allocator with standard collections can be highly useful, as the article points out. I do recommend defining your own container deriving from a type such as std::vector using private inheritance, and exposing the base definitions via the "using" keyword and replicating applicable typedefs/constructors.
Doing so will help prevent "interesting" behaviour and help expose assumptive template definitions in a code base.
Doing so will help prevent "interesting" behaviour and help expose assumptive template definitions in a code base.