r/cpp • u/boostlibs • Apr 22 '26
Boost 1.91 Released: New Decimal Library, SIMD UUID, Redis Sentinel, C++26 Reflection in PFR
https://boost.org/releases/1.91.0/Boost 1.91 is out. Here's a rundown of what's notable.
New Library
Boost.Decimal: A full IEEE 754 / ISO 24733 implementation of decimal floating point types (decimal32_t, decimal64_t, decimal128_t) plus non-conformant fast variants. Significands stored in base-10, so 0.1 + 0.2 actually equals 0.3. Header only, no dependencies, C++14. Comes with <cmath>, <charconv>, <format>, rounding mode, and numeric_limits support out of the box. If you've been using integer arithmetic or fixed-point to dodge binary FP in finance or embedded, it's worth a look. Authors: Matt Borland and Chris Kormanyos.
Highlights from Updated Libraries
- Boost.UUID: SIMD implementations of from_chars (up to 13x faster) and to_chars (up to 5.5x faster). Most accessors and operations are now constexpr on C++14+.
- Boost.Redis: Built-in Sentinel support with automatic master/replica discovery and reconnection. New generic_flat_response uses contiguous memory with zero steady state allocations. Subscription tracking now restores active subscriptions after reconnect.
- Boost.PFR: Experimental C++26 reflection backend. Define BOOST_PFR_USE_CPP26_REFLECTION to enable.
- Boost.Optional: Moved from aligned storage to union storage, enabling gradual constexpr support across C++11/14/17. New syntax: o = {} to clear, o.value_or({}) for defaults. Conversion from optional<T>& to optional<T&>. Heads up: a future release will make optional model std::ranges::range, which could affect overload resolution in code that branches on range vs. optional-like traits.
- Boost.MultiIndex: Breaking: type lists migrated from Boost.MPL to Boost.Mp11. composite_key is now variadic (returns std::tuple instead of boost::tuple). Define BOOST_MULTI_INDEX_ENABLE_MPL_SUPPORT to restore legacy behavior, but MPL support will eventually be removed.
- Boost.MSM (backmp11): flat_fold dispatch strategy, up to 25% faster compile times and lower RAM usage vs 1.90. Merged event pool with small object optimization. Several bug fixes for hierarchical state machines.
- Boost.System: result<>::operator* and operator-> now throw when empty instead of UB. Old behavior available via unsafe_value(). Added unwrap_and_invoke.
- Boost.Exception / Boost.LEAF: Both gained a customizable serialization API with built-in support for Boost.JSON and nlohmann/json.
- Boost.TypeIndex: Optimized CTTI comparisons from C++20. ctti_type_index::name() now returns a pretty name by default in C++14+.
- Boost.LexicalCast: Initial C++20 module implementation (boost.lexical_cast).
- Boost.Stacktrace: from_exception now works out of the box without the compile-time runtime compatibility check that was producing false positives.
- Boost.URL: Parse functions now constexpr under C++20. Object size reduced on 64 bit (internal offsets narrowed to uint32_t). Three round external security audit resulting in 21 fixes.
Full release notes: https://www.boost.org/releases/1.91.0/
14
u/yuri-kilochek Apr 22 '26
Decimal is fantastic, thank you everyone involved.
12
u/kiner_shah Apr 23 '26
Boost is awesome. Thanks to all contributors.
8
u/AhaGames Apr 22 '26
Decimal, Redis sentinel, SIMD UUID in one release. nice. is anyone's production codebase actually going to adopt these, or does this mostly live in the C++ standards-adjacent world?
4
u/bbmario Apr 23 '26
The current boost momentum is great. The focus on performance as well. Bravo!
3
u/User_Deprecated Apr 23 '26
Decimal is the part that caught my eye. Anything touching price fields usually turns into scaled ints, or you just hope double doesn't betray you somewhere. Going straight from wire bytes into a real decimal type would remove a lot of ugly code I've got lying around.
Also didn't expect header-only C++14 for something this chunky.
3
u/RogerLeigh Scientific Imaging and Embedded Medical Diagnostics Apr 23 '26
I stopped using MultiIndex because of the fragile MPL dependency (it didn't work well if you had multiple llibraries in use with MPL dependencies clashing). Moving onto mp11 is a nice update, just a shame it took so long to get there. But good to know it's possible to use again should I need it.
3
u/meetingcpp Meeting C++ | C++ Evangelist Apr 23 '26
Sadly the RSS link broke, last build time is Oct 4th 2025: http://www.boost.org/feed/news.rss
you might want to fix that.
2
u/feverzsj Apr 23 '26 edited Apr 23 '26
The font on the new website is horribly thin. And I can't override it in browser settings.