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

In Progress Releases

Note: The release notes on this page are for releases still under development. Please don't use this page as a source of information, it's here for development purposes only. Everything is subject to change.

Version 1.73.0

In Progress

New Libraries

  • TODO

Updated Libraries

  • TODO
  • Any:
    • Speedup compilation by not including <algorithm>.
    • Maintenance work, including CI hardening.
  • Assert:
    • Added source_location.
  • Atomic:
    • Implemented C++20 atomic_ref. See docs and especially the caveats section.
    • Implemented atomic_flag::test operation, which was introduced in C++20.
    • atomic<T> should now take into account alignment requirements of T, which makes a difference if those requirements are higher than that of the internal storage of atomic.
    • Added static asserts enforcing the requirements on the value type T used with atomic and atomic_ref. This should prohibit invalid types from being used as atomics.
    • Improved internal lock pool implementation. The pool is larger, and lock selection accounts for atomic object alignment, which should reduce the potential of thread contention.
    • Fixed incorrect x86 code generated for bit_test_and_* operations on 8 and 16-bit arguments. Other architectures are not affected.
    • Fixed a possible unaligned memory access in compare_exchange_* operations, if alignment requirements of value_type are less than that of the internal storage of atomic.
    • boost/atomic/atomic.hpp no longer includes boost/atomic/atomic_flag.hpp and boost/atomic/fences.hpp and only defines the boost::atomic class template and related typedefs. Include the other headers explicitly or use boost/atomic.hpp to include all parts of Boost.Atomic.
    • The atomic<T>::storage() accessor and associated atomic<T>::storage_type type are deprecated. Instead, users are advised to use atomic<T>::value() and atomic<T>::value_type, respectively. Users can define BOOST_ATOMIC_SILENCE_STORAGE_DEPRECATION to disable deprecation warnings for the time of transition. The deprecated pieces will be removed in a future release.
    • Removed support for BOOST_ATOMIC_DETAIL_HIGHLIGHT_OP_AND_TEST. This macro was used as a helper for transition to the updated returned values of *_and_test operations in Boost.Atomic 1.67, which was released 2 years before 1.73.
  • Beast:
    • This is a maintenance update.
    • Nested mutable_data_type in Beast dynamic buffers is deprecated.
    • We'd love to know how you or your company use Beast, consider adding an entry to the Companies and Individuals Using Beast list.
    • See the full Release Notes for a complete list of changes.
  • Context:
    • #133: IBM Z: Fix fcontext routines
    • #132: mips64/n64: .align 3
    • #131: Use OSPLAT MIPS32/MIPS64 to set different ABI
    • #129: Fix non-PIC in RISC-V assembly
  • Conversion:
    • Added boost::polymorphic_downcast for references (thanks to Julien Delacroix for the patch).
    • Significant docs update.
  • DLL:
    • Fixes and tests for demangling in boost::dll::smart_library (thanks to Ramil Gauss for #35).
    • Make UB sanitizers happy with boost::dll::load_mode::type #30.
    • Ceased dependence on MPL improving compile times (thanks to Nikita Kniazev for #34).
    • Clang and ICC on Windows fixes and CI support for those platforms (thanks to Nikita Kniazev #33).
    • Maintenance work, including CI hardening and tests improving.
  • Flyweight:
    • Maintenance work.
  • GIL:
    • Added
      • New member function size() in any_image_view class (PR#456).
    • Changed
      • Replace Boost.Test with Boost.LightweightTest as the only test framework used in GIL (PR#459) and (PR#464). This also restructured the test/extension/io/ sub-tree and targets in related Jamfile-s.
      • Removed remaining uses of Boost.MPL (PR#459).
      • Renamed all macros using BOOST_GIL_ prefix (PR#411).
      • Renamed all CMake configuration options using BOOST_GIL_ prefix (PR#419).
    • Changed
      • Removed extension/dynamic_image/reduce.hpp as unused and possibly unfinished (PR#466). An implementation attempt of techniques described in the paper [Efficient Run-Time Dispatching in Generic Programming with Minimal Code Bloat](http://lubomir.org/academic/MinimizingCodeBloat.pdf) by Lubomir Bourdev, Jaakko Jarvi.
      • Removed direct dependency on Boost.MPL, Boost.System and Boost.Test.
      • Started removing public macros for compile-time configuration of I/O extension tests, i.e. BOOST_GIL_IO_TEST_ALLOW_READING_IMAGES and BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES. Instead, if a test target is built, it builds all its test cases unconditionally.
    • Fixed
      • Avoid longjmp interaction during destruction of I/O extension objects (PR#433).
      • Fixed missing alignment default value in constructor of image class (PR#429).
      • Fixed segmentation fault when reading corrupted PNG file (PR#414).
      • Fixed illegal initialization of return values in the old IOv1 interface of I/O extension (PR#409).
  • LexicalCast:
    • Maintenance work, including CI hardening and better workarounds for broken standard libraries (thanks to Nikita Kniazev #32, #33).
  • Log:
    • New Features:
      • Default sink used in trivial logging, when no sinks are registered in the logging core, now automatically flushes output after each log record. (#103)
      • core::flush now performs a flush on the default sink used for trivial logging, when no sinks are registered.
    • Bug fixes:
      • Added a workaround for some syslog API implementations (e.g. glibc), which do not save the application identification string in openlog call. Such implementations could access already freed memory on each syslog call, resulting in undefined behavior. (#97)
      • Fixed that log file rotation on a specific day of month (e.g. rotation_at_time_point(boost::gregorian::greg_day(1))) could be silently ignored and not happen. (#98)
      • Fixed that text_file_backend::rotate_file could throw if there were no log records written yet and target file name pattern was set.
      • Ported various components of the library to std::allocator_traits to improve compatibility with C++20 allocators.
      • Fixed compilation errors when building in MSYS2 Cygwin environment. (#102)
    • See changelog for more details.
  • Mp11:
    • Added mp_unique_if (contributed by Kris Jusiak)
    • Added mp_flatten
    • Added mp_rotate_left, mp_rotate_right (contributed by Duncan Barber)
    • Added mp_compose
    • Added mp_power_set
    • Added mp_partial_sum
    • Added mp_iterate
  • Multi-index Containers:
    • multi_index_container is now AllocatorAware.
    • Swapping of internal KeyFromValue, Compare, Hash and Pred objects now selects the appropriate swap function between std::swap and ADL candidates, in accordance with standard specifications in [swappable.requirements] (issue #29).
    • Provided some internal copy constructors and assignment operators whose default implicit definition is deprecated in C++11 onwards ([depr.impldec]), which was warned about on some compilers.
    • Maintenance work.
  • IO:
    • Made all the IOS state saver classes non-copyable. (Glen Fernandes)
    • Correctly handle error upon first read from the input stream when reading a quoted string. (Glen Fernandes)
    • Implemented ostream_joiner for delimiter based joining. (Glen Fernandes)
    • Relocated ostream_string from the Utility library to the IO library as ostream_put. (Glen Fernandes implemented this facility when optimizing the output of string views to write directly to the stream buffer).
    • Glen Fernandes became maintainer of the IO library.
  • Outcome:
    • Enhancements:
      • Performance of Outcome-based code compiled by clang has been greatly improved. The previous implementation of Outcome's status bitfield confused clang's optimiser, which caused low quality codegen. Unlike most codegen issues, this was noticeably in empirical benchmarks of real world code, as was shown by P1886 Error speed benchmarking.
      • The safe part of the better_optimisation Outcome v2.2.0 future branch was merged to Outcome v2.1.3 which includes a new status bitfield implementation. This appears to not confuse clang's optimiser, and clang 9 produces code which routinely beats GCC 9's code for various canned use cases.
      • Installability is now CI tested per commit. Due to installability of standalone Outcome (e.g. make install) breaking itself rather more frequently than is ideal, installability is now tested on CI per commit.
    • Bug fixes:
      • #214 Newer Concepts implementing compilers were unhappy with the early check for destructibility of T and E, so removed template constraints, falling back to static assert which runs later in the type instantiation sequence.
      • #220 A false positive undefined behaviour sanitiser failure in some use cases of Experimental Outcome was worked around to avoid the failure message.
  • PolyCollection:
    • Suppressed a potential redundant move warning in boost::poly_collection::for_each.
    • Fixed a bug by which elements were copied rather than moved in allocator-extended move construction and move assigment between collections with non-propagating, unequal allocators.
    • Allocator-extended move construction no longer decays to allocator-extended copy construction for the legacy version of libstdc++-v3 shipped with GCC 4.8 (which can also be used by Clang).
  • Stacktrace:
    • Added documentation on distribution of PDBs #55, #47 (thanks to emptyVoid and Roger Orr for information and to zlojvavan for testing).
    • Fixed msvc-9 build
    • Maintenance work, including test fixes #86, fixing typos #84, CI improvements and hardening, inspect tool fixes.
  • ThrowException:
    • Added an overload of throw_exception that takes a boost::source_location object.
    • NOTE: Projects using BOOST_THROW_EXCEPTION with exceptions disabled will need to add a definition of this new overload.
  • TypeIndex:
    • Maintenance work, including CI integration with inspect tool.
  • Utility:
    • The ostream_string facility has moved from the Utility library to the IO library as ostream_put.
  • Variant:
    • Removed unused includes (thanks to Nikita Kniazev #74).
    • Maintenance work, including typo fixes.
  • Variant2:
    • Added support for std::hash, boost::hash.
    • variant<T...> is now trivial when all types in T... are trivial. This improves performance by enabling it to be passed to, and returned from, functions in registers.
  • WinAPI:
    • Headers in boost/detail/winapi are deprecated and will be removed in a future release.
    • Boost.WinAPI headers no longer include winerror.h. Include boost/winapi/error_codes.hpp to get Windows error codes. (#81)

Updated Tools

  • B2:
    • Includes release 4.2.0 of B2.
    • WARNING: Since version 4.0.0 B2 requires a capable C++11 compiler to bootstrap. This is only needed to build B2 itself not to build Boost for your use.

Compilers Tested

Boost's primary test compilers are:

  • TODO

Boost's additional test compilers include:

  • TODO

Acknowledgements

TODO