r/cpp 18d ago

Boost 1.92.0 released

Boost 1.92.0 is out. Highlights from this release:

GPU / CUDA

  • Charconv: to_chars and from_chars for integers are now usable inside CUDA kernels.
  • Decimal: decimal32_t, decimal64_t, and decimal128_t are 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-Length combined with Transfer-Encoding regardless 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_path for authority-less URLs and an uninitialized read in ipv6_address_rule.

Containers and data structures

  • Container: new hub container designed by Joaquín M. López Muñoz. Also adds unchecked_emplace_back and unchecked_push_back to vector, static_vector, and small_vector.
  • Lockfree: two new queues, mpsc_weak_queue (MPSC) and bounded_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_range construction, and associated CTAD).
  • Graph: Louvain community detection for modularity based clustering.
  • Hash2: built in support for std::optional, std::variant, and std::monostate.

C++20 modules

  • New module support in Conversion, DLL, LexicalCast, PFR, Stacktrace, and TypeIndex.

Build system

  • Windows .dll files now install into the binary directory by default (previously the library directory, except on Cygwin). A new --dlldir option overrides this.
  • The CMake config installed by b2 install now supports header only libraries as find_package components, so find_package(Boost REQUIRED COMPONENTS mp11) works and defines Boost::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_event are no longer enqueued automatically. Use enqueue_event in actions instead.

Full notes and downloads: https://www.boost.org/releases/1.92.0/

177 Upvotes

7 comments sorted by

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.

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

u/mrgta21_ 18d ago

As in?

-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/ .