Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

Version 1.88.0

Version 1.88.0 beta 1

March 16th, 2025 04:24 GMT

Documentation

Beta Downloads
PlatformFileSHA256 Hash
unixboost_1_88_0_b1.tar.bz29e42c0611500151d795d66a07ef0a21036c02d24678e2e887caf6d97fcbc25ca
boost_1_88_0_b1.tar.gz3c334a9a743b68a35452b0223be8932fb39f26a6938382f9b9e625c4df99602c
windowsboost_1_88_0_b1.7z7faf60c4cb12ee90270e41716cf3735a8739016d7346983ce9f5e899e510b26d
boost_1_88_0_b1.zipbc4948bc664fde0c2142badae2679a42124b464dc58019250afe0ef57fd7763e
* The download links are supported by grants from The C++ Alliance.

New Libraries

  • Hash2: An extensible hashing framework, from Peter Dimov and Christian Mazakas.
  • MQTT5: MQTT5 client library built on top of Boost.Asio, from Ivica Siladić, Bruno Iljazović, and Korina Šimičević.

Updated Libraries

  • Array:
    • Converted documentation to AsciiDoc (Christian Mazakas).
    • Added noexcept and constexpr as appropriate.
    • Marked obsolete functions as deprecated.
    • Removed obsolete compiler workarounds.
    • Changed array<T, 0>::begin(), cbegin(), end(), cend() to return nullptr, enabling constexpr. This matches the behavior of std::array.
    • Removed local hash_value overload; boost::hash supports array-like types natively.
    • array<T, 0> can now be initialized with = {{}}.
    • Added operator<=>.
    • Added to_array.
  • Assert:
    • When BOOST_ASSERT_HANDLER_IS_NORETURN is defined, boost::assertion_failed and boost::assertion_failed_msg are declared as BOOST_NORETURN.
  • Beast:
    • Fixes
      • Fixed out-of-bounds access in iequals function.
    • Improvements
      • Updated SSL examples to verify peer certificate hostname.
      • Refactored CMakeLists.
      • Removed Boost.Scope dependency from examples.
      • Peer pings in WebSocket now count as activity.
    • Documentation
      • Added new examples for Unix domain sockets.
      • Added SSL/TLS Certificate section to documentation.
      • Improved documentation of websocket::stream::async_close.
    • Acknowledgements
      • Morten M. Neergaard
  • Conversion:
    • Use modern C++ in the samples and in the library code.
  • DLL:
    • Added constructor from native_handle_t to the boost::dll::shared_library. Many thanks to Tiago Matos for the PR#82.
    • Dropped multiple dependencies on other Boost libraries including Spirit, SmartPtr, Move, TypeTraits, and Function. DLL became more lightweight for compilation.
    • std::error_code& in API is used instead of the boost::system::error_code&. This is not a breaking change as boost::system::error_code is convertible to std::error_code&.
    • boost::dll:import_* functions now return std::shared_ptr rather than boost::shared_ptr. Define BOOST_DLL_USE_BOOST_SHARED_PTR to restore the old behavior, however note that the macro will be removed in one of the upcomming Boost releases.
    • Use modern C++ in the samples and in the library code.
    • boost::dll::library_info now always throws in case of a broken binary. Updated the docs and added some tests.
    • Documented in FAQ why RTLD_NODELETE is missing and why there is no .release() method. Provided suggestions on possible workarounds.
    • Updated the information on building and using the library. CMake targets now link with -ldl if it is required by the platform.
    • Fixed detail::path_from_handle implementation for long paths on Windows OS.
    • Highlighted in the docs that boost/dll/smart_* parts of the library are experimental and incomplete.
    • Fixed multiple mangling issues in boost/dll/smart_* parts of the library.
  • Iterator:
    • Dropped support for C++03 and ancient compilers, updated code base to use C++11 and MP11, reduced usage of MPL. (PR#82)
    • Added min_category trait, which is a variadic equivalent of minimum_category that doesn't depend on MPL. minimum_category is deprecated and will be removed in a future release.
    • Extracted enable_if_convertible trait to a separate header enable_if_convertible.hpp. The trait was previously defined in iterator_adaptor.hpp, and the header still provides enable_if_convertible when included. This dependency is provided for backward compatibility and will be removed in a future release. Users are advised to add includes of enable_if_convertible.hpp, as needed.
    • Added *_t variants of various iterator traits that produce types.
    • filter_iterator and transform_iterator now use empty base optimization (EBO) to reduce size of the iterator when the adopted function object is stateless.
    • zip_iterator now natively supports boost::tuple, std::tuple and std::pair for iterator tuples and doesn't need including Fusion support headers.
    • function_output_iterator no longer allows default construction when the wrapped function is a function pointer. Such construction would previously create an iterator with an uninitialized function pointer value, and such an iterator would be unusable.
    • generator_iterator.hpp and shared_container_iterator.hpp headers were moved under the boost/iterator directory. The previous headers in boost are still retained for backward compatibility, but will be removed in a future release. Users are advised to update their includes.
    • shared_container_iterator now uses std::shared_ptr to reference the container internally. The support for boost::shared_ptr is still retained, but it will incur performance overhead on the iterator construction, as boost::shared_ptr is now wrapped in a std::shared_ptr internally. It is recommended to use std::shared_ptr to reference the container.
  • Locale:
    • Raised required ICU version to at least 4.8.1
    • Dropped support for ICU 50.1
    • Fixed parsing of integers with input strings in floating point format (PR#241)
    • Support parsing and formatting of uint64_t values with the ICU backend (PR#246)
    • Support char8_t on more platforms
  • Lockfree:
    • Added new spsc_value, a lockfree single-producer single-consumer value based on a triple-buffer
  • Log:
    • Disabled usage of std::codecvt<char16_t> and std::codecvt<char32_t> locale facets in C++20 and later modes as they were deprecated in C++20. This means character code conversions to/from char16_t and char32_t is no longer available in C++20 and later.
    • Fixed building issues when using CMake and MinGW-w64. (PR#241)
  • Mp11:
    • Fixed mp_from_sequence for non-integral values (accidentally broken in 1.83.0 due to offset support)
  • MySQL:
    • connection_pool now resizes correctly even in the presence of many connections with session establishment in-progress. The old algorithm could lead to the pool not being resized as expected under certain conditions (#395).
    • Added any_connection::connection_id. This function retrieves the connection's ID, which can subsequently be used in KILL SQL statements to cancel queries. This function is equivalent to mysql_thread_id in the official C API (#408)
    • Attempting to start an async operation on a connection or any_connection while another operation is in-progress no longer triggers undefined behavior. It now fails with client_errc::operation_in_progress (#405).
    • Attempting to start an operation while a connection or any_connection are engaged in a multi-function operation no longer yields potentially dangerous packet mismatches. It instead fails with client_errc::engaged_in_multi_function (#448).
    • Improved diagnostics when attempting to use a connection without a established session. Operations now fail with client_errc::not_connected (#450).
    • Fixed a race condition in connection and any_connection regarding per-operation cancellation. In previous versions, if a cancellation signal was emitted after an intermediate async operation had completed, but before its handler had been called, the signal was ignored. This is no longer the case (#199).
    • field's constructor and assignment from std::string_view are now available in C++17, rather than C++20. These functions were guarded by standard feature-test macros, only available in C++20. These have been replaced by their Boost.Config equivalents.
    • Added an HTTP server example that uses C++20 coroutines.
    • Added a doc page on interfacing sync and async code. This replaces the synchronous connection pool snippet, which contained a race condition.
    • Improved some of the other examples and doc pages.
  • Nowide:
    • Make getenv thread-safe (PR#191)
  • PolyCollection:
    • Added boost::variant_collection, a closed polymorphic collection similar in behavior to std::vector<std::variant<...>>.
  • SmartPtr:
    • Fix operator<< for wide streams (accidentally broken in 1.87.0)
  • Stacktrace:
    • Use GetModuleNames to determine the full module path for MSVC implementation. Many thanks to Daniel Krügler for the PR#198.
    • Print relative addresses to allow their decoding later without knowing the base address. The logic could be disabled by defining BOOST_STACKTRACE_DISABLE_OFFSET_ADDR_BASE. Many thanks to Maciej Czarnecki for the PR#200.
    • Expose all the stacktrace libraries as b2 features for better control over the build and explicit information on what libraries are built. See "Configuration and Build" section for more info. Many thanks to Uilian Ries for initial implementation of the feature in PR#202.
    • Fixed stacktrace_from_exception builds with MinGW. Thanks to crhilton for the fix.
  • Unordered:
    • Migrated the documentation to a multipage format using Antora.
  • Variant2:
    • Use the smallest appropriate unsigned type for the index.

Compilers Tested

Boost's primary test compilers are:

  • TODO

Boost's additional test compilers include:

  • TODO

Acknowledgements

Marshall Clow, Glen Fernandes and Ion Gaztañaga managed this release.