The standard library allocators are one of the more mysterious parts of namespace std
, as well as one of the more flexible parts. In this "under construction" article and GitHub repo, Thomas Köppe undertakes to demystify the feature.
A visitor’s guide to C++ allocators (repo)
by Thomas Köppe
From the README:
This repository contains a collection of documents that describe the allocator concept in the standard library of C++11 and beyond. The main guide covers the following topics.
- Allocator traits
- Statefulness
- Fancy pointers
- Allocator propagation in breadth (container copy, POC{CA,MA,S}) and depth (
scoped_allocator_adaptor
)Start reading with the main guide.
Furthermore, there are several worked-out end-to-end examples:
The code for the end-to-end examples is available separately in the
example_code
directory.
Add a Comment
Comments are closed.