
On Mon, Jun 29, 2009 at 6:12 PM, Christian Schladetsch < christian.schladetsch@gmail.com> wrote:
The issue of which allocator to use is quite important to some people, especially in embedded and/or high-performance situations. Sliding in a heap allocation somewhere in a container which has an allocator is a big no-no. ptr_container does it as well when making temporary arrays and for clones.
High-performance/embedded situations are probably not going to need heterogeneous storage. Moreover, not only does deriving from common_base suddenly make a class polymorphic, which adds a vptr, and thus extra size, to every class instance, but your code uses dynamic_cast which requires RTTI, which is typically disabled in these environments to reduce overhead.