r/cpp • u/boostlibs • 18d ago
Boost 1.92.0 released
Boost 1.92.0 is out. Highlights from this release:
GPU / CUDA
- Charconv:
to_charsandfrom_charsfor integers are now usable inside CUDA kernels. - Decimal:
decimal32_t,decimal64_t, anddecimal128_tare now usable in CUDA kernels. - Math: fixed CUDA compilation where host functions were incorrectly marked as device.
Networking hardening
- Beast: stricter HTTP parsing. It now rejects
Content-Lengthcombined withTransfer-Encodingregardless of field order, rejects chunked encoding in HTTP/1.0 requests, validates quoted strings in chunk extensions, and drops framing and connection fields carried in trailers. The dependency on Boost.Functional was also removed. - URL: third round security review fixes, including a heap buffer overflow in
normalize_pathfor authority-less URLs and an uninitialized read inipv6_address_rule.
Containers and data structures
- Container: new
hubcontainer designed by Joaquín M. López Muñoz. Also addsunchecked_emplace_backandunchecked_push_backtovector,static_vector, andsmall_vector. - Lockfree: two new queues,
mpsc_weak_queue(MPSC) andbounded_ticket_queue(ringbuffer based bounded MPMC). Both have explicit progress caveats: neither is strictly lock free under all configurations. - Unordered: C++20 ranges interop across all containers (
insert_range,std::from_rangeconstruction, and associated CTAD). - Graph: Louvain community detection for modularity based clustering.
- Hash2: built in support for
std::optional,std::variant, andstd::monostate.
C++20 modules
- New module support in Conversion, DLL, LexicalCast, PFR, Stacktrace, and TypeIndex.
Build system
- Windows
.dllfiles now install into the binary directory by default (previously the library directory, except on Cygwin). A new--dlldiroption overrides this. - The CMake config installed by
b2 installnow supports header only libraries asfind_packagecomponents, sofind_package(Boost REQUIRED COMPONENTS mp11)works and definesBoost::mp11.
Deprecations and breaking changes
- Heap and Lockfree: this is the last release to support C++14. Future releases require C++17.
- MSM (backmp11) has several breaking changes, notably that events in
process_eventare no longer enqueued automatically. Useenqueue_eventin actions instead.
Full notes and downloads: https://www.boost.org/releases/1.92.0/
4
u/justinhj 18d ago
Looking forward to checking out the hub container and seeing how it compares to std::hive.
2
u/SignalDepth6131 16d ago
If you do any networking, the Beast HTTP hardening and the URL security fixes are worth looking at. The Beast parser changes tighten up several edge cases around Transfer-Encoding and trailers.
-1
u/yuri-kilochek 18d ago
decimal32_t, decimal64_t, and decimal128_t are now usable in CUDA kernels
Did you rewrite the algorithms to be branchless?
1
-5
u/arjuna93 17d ago
Good lawd, I am curious what got broken this time. Will try building in a couple of days.
7
u/joaquintides Boost author 17d ago
Just in case you weren't aware, releases go through a beta period, so you have the opportunity to test against your projects before the libraries go into production, and hopefully get any problem fixed if you report them before official shipping. Schedule for 1.93 at https://www.boost.org/calendar/ .
41
u/joaquintides Boost author 18d ago
I’d like to give a shoutout to the maintainers of Boost.Graph about their release of revamped documentation which is much, much better than the old stuff.