Containers galore

During Q4 2025, I’ve been working in the following areas:

Boost.Bloom

  • Written an article explaining the usage and implementation of the recently introduced bulk operations.

Boost.Unordered

Boost.MultiIndex

  • Refactored the library to use Boost.Mp11 instead of Boost.MPL (PR#87), remove pre-C++11 variadic argument emulation (PR#88) and remove all sorts of pre-C++11 polyfills (PR#90). These changes are explained in an article and will be shipped in Boost 1.91. Transition is expected to be mostly backwards compatible, though two Boost libraries needed adjustments as they use MultiIndex in rather advanced ways (see below).

Boost.Flyweight

  • Adapted the library to work with Boost.MultiIndex 1.91 (PR#25).

Boost.Bimap

  • Adapted the library to work with Boost.MultiIndex 1.91 (PR#50).

Other Boost libraries

  • Helped set up the Antora-based doc build chain for DynamicBitset (PR#96, PR#97, PR#98).
  • Same with OpenMethod (PR#40).
  • Fixed concept compliance of iterators provided by Spirit (PR#840, PR#841).

Experiments with Fil-C

Fil-C is a C and C++ compiler built on top of LLVM that adds run-time memory-safety mechanisms preventing out-of-bounds and use-after-free accesses. I’ve been experimenting with compiling Boost.Unordered test suite with Fil-C and running some benchmarks to measure the resulting degradation in execution times and memory usage. Results follow:

Proof of concept of a semistable vector

By “semistable vector” I mean that pointers to the elements may be invalidated upon insertion and erasure (just like a regular std::vector) but iterators to non-erased elements remain valid throughout. I’ve written a small proof of concept of this idea and measured its performance against non-stable std::vector and fully stable std::list. It is dubious that such container could be of interest for production use, but the techniques explored are mildly interesting and could be adapted, for instance, to write powerful safe iterator facilities.

Teaser: exploring the std::hive space

In short, std::hive (coming in C++26) is a container with stable references/iterators and fast insertion and erasure. The reference implementation for this container relies on a rather convoluted data structure, and I started to wonder if something simpler could deliver superior performance. Expect to see the results of my experiments in Q1 2026.

Website

Support to the community

  • I’ve been part of a task force with the C++ Alliance to review the entire catalog of Boost libraries (170+) and categorize them according to their maintainance status and relevance in light of additions to the C++ standard library over the years.
  • Supporting the community as a member of the Fiscal Sponsorhip Committee (FSC).

All Posts by This Author