AllocatorAwareContainer: Introduction and pitfalls of propagate_on_container_XXX defaults

While I was writing the std_allocator adapter of foonathan/memory I’ve learned some not so well-known facts about the STL Allocator and AllocatorAwareContainer concepts I’d like to share. Let’s take a deep breath and dive in into an aspect of the STL containers that isn’t that well covered: Allocator storage.

I will explain the comparison properties of Allocators, show the C++11 propagate_on_container_XXX traits and how the combination of the two can lead to an unnecessary pessimization and a probably not widely known case of undefined behavior.

» read more »
Author's profile picture Jonathan

Memory 0.4: Polishing, Error handling, Storage, Traits, Documentation and more

It took a really long time - three months minus one day - but I have finally finished version 0.4 of foonathan/memory. The release contains a lot of changes and has more than doubled the number of commits.

» read more »
Author's profile picture Jonathan

Advertisement