New container in Boost.PolyCollection, additions to Boost.Mp11 and more
Libraries
Posted on January 5, 2025
During Q4 2024, I’ve been working in the following areas:
Boost.Unordered
- Updated CI support (PR#293, PR#296, PR#297, PR#298).
- Prepared a private document for Peter Dimov and Braden Ganetsky discussing massively parallel scenarios where ParlayHash has better performance than boost::concurrent_flat_map. We haven’t been able to progress much further than that in Q4 2024, mainly because of my lack of availablity for this specific task.
- I’ve set up and run benchmarks comparing indivi::flat_umap with boost::unordered_flat_map. Although Indivi is generally slower, a conversation with the author led to some interesting design discussions that may be worth exploring further.
- After the last major update in Boost 1.87.0, the backlog for Boost.Unordered is basically cleared. This means that the library will likely enter into maintenance mode, except if new requests show up —do you have any?
Boost.PolyCollection
- Updated CI support (PR#22, PR#23).
- Added the new boost::variant_collection container (to be released in Boost 1.88.0). boost::variant_collection_of<Ts...> is similar to std::vector<std::variant<Ts...>>, with the crucial difference that elements storing the same alternative type are grouped together. For instance, the following: boost::variant_collection_of<int, double, std::string> c; // ... for(const auto& v: c) { visit( [](const auto& x) { std::cout << x << "\n"; }, v); }
will print first the ints in the collection, then the doubles, and finally the std::strings. In exchange for this restriction, important processing speedups can be obtained.
Boost.Mp11
- Implemented mp_lambda (released in Boost 1.87.0), a metaprogramming utility inspired by the venerable placeholder expressions from Boost.MPL. mp_lambda allows us to generate complex types specified with a rather natural syntax in terms of elementary input types indicated by Boost.Mp11 placeholder types. For instance, std::pair<_1*, _2*> can be regarded as a type template with two placeholder positions, and mp_lambda<std::pair<_1*, _2*>>::fn<int, char> is, unsurprisingly enough, the type std::pair<int*, char*>. My original motivation for writing this utility is to provide a Boost.Mp11 equivalent to Boost.MPL lambda expressions that can pave the way for an eventual modernization of Boost.Flyweight, which relies heavily on this functionality from Boost.MPL.
- Rewritten the implementation of mp_is_set (PR#100, released in Boost 1.87.0) to achieve some rather noticeable compile-time improvements.
Boost.MultiIndex, Boost.Flyweight
Boost promotion and new website
- Authored the Boost 1.87 announcement tweet, and the Boost.Hash2 acceptance tweet.
- Held some meetings with Rob’s team on Asciidoc display problems and a new latest URL scheme for doc publication. I’m very excited about the latter, as this addition will likely help us improve SEO and fight outdated archived links to the libraries docs: for instance, the link https://www.boost.io/doc/libs/latest/doc/html/boost_asio.html will always point to the latest published version of Boost.Asio documentation, unlike version-specific links such as https://www.boost.io/doc/libs/1_87_0/doc/html/boost_asio.html.
- Filed some issues (#1549, #1576, #1577).
Support to the community
- I’ve proofread Braden Ganetsky’s article on Natvis testing.
- As a member of the Fiscal Sponsorhip Committee (FSC), we’re having conversations with For Purpose Law Group to finalize the writing of the Boost/C++ Alliance Fiscal Sponsor Agreement (FSA), and with the Boost Foundation to help them complete the transfer of the assets to be controlled by such FSA, most importantly the ownership of the boost.org domain. Both tracks are making progress, albeit at a lower pace than desired.
Related news
View all →
Libraries
Joining Community, Detecting Communities, Making Community.
Early in Q1 2026, I joined the C++ Alliance. A very exciting moment.
Read more →
Libraries
The road to C++20 modules, Capy and Redis
C++20 modules have been in the standard for 6 years already, but we’re not seeing widespread adoption. The ecosystem is still getting ready.
Read more →Stay up to date
Get Alliance news, project updates, and community highlights in your inbox.
SubscribeEmpowering C++ by funding libraries, building community, and advancing the language.
Connect with us