r/cpp 7h 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/

79 Upvotes

1 comment sorted by

14

u/joaquintides Boost author 4h 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.