Performance improvements
Reworked directory_iterator and switched unordered containers to Fibonacci hashing, boosting traversal and lookup speed.
Reworked directory_iterator and switched unordered containers to Fibonacci hashing, boosting traversal and lookup speed.
Added five new dependencies across five libraries and removed four dependencies from three libraries.
Fixed remove_all race condition (CVE‑2022‑21658) and corrected numerous header and warning issues.
Added nodiscard attributes, source_location support, and constexpr QVM features for clearer diagnostics and modern C++ usage.
April 13th, 2022 14:22 GMT
These are patches from library authors which were found too late to be fixed in the release.
bind_allocator.
file_base::sync_all_on_write flag.
basic_file::release().
recycling_allocator
as part of the public interface.
nodiscard
attribute to a number of functions.
SSL* into an ssl::stream<>.
executor_work_guard<> in all build configurations.
bind_cancellation_slot
and bind_executor
compatibility with legacy completion tokens.
associator
specialisations for experimental::append
and experimental::prepend.
associated_allocator
primary template.
async_receive_from for sockets
and write_some_at
for files.
experimental::coro's
per-operation cancellation.
experimental::promise's
type-erased completion handlers.
operator= implementation for ssl::stream.
any_io_executor
implementation to work when both BOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT
and BOOST_ASIO_SEPARATE_COMPILATION
are defined.
basic_socket::at_mark() when using the sockatmark() system call.
fopen().
EAGAIN.
experimental::basic_channel::reset() and experimental::basic_concurrent_channel::reset().
experimental::promise.
co_spawn
implementation to dispatch cancellation signals through the executor
in some circumstances.
dispatch(), post(), and defer().
io_context
reference documentation to use executor_work_guard.
make_strand(),
make_work_guard(), ip::address_v4,
ip::address_v6, experimental::basic_channel, and experimental::basic_concurrent_channel.
source_location().file_name()
and source_location().function_name() now return ""
instead of "(unknown)".
source_location
constructor from std::source_location.
BOOST_CURRENT_LOCATION
to more closely match the behavior of std::source_location::current(), such as being usable at top level
or as a default function argument.
BOOST_ATOMIC_NO_DARWIN_ULOCK
configuration macro. The macro affects compilation on Darwin systems
and disables ulock-based
implementation of waiting and notifying operations. This may be useful
to comply with Apple App Store requirements. (#55)
file_posix
and file_win32.
file_win32
and file_stdio.
boost::pointer_traits SFINAE friendly,
addressing LWG3545. (Glen Fernandes)
boost::allocator_traits that uses the
individual allocator access traits. This implementation supports
C++03 and above. (Glen Fernandes)
boost/iterator.hpp is deprecated and will be removed
in a future release. The header defines boost::iterator
template, which is equivalent to std::iterator
in <iterator> header. However, since std::iterator is itself deprecated in
C++17, users are advised to remove boost::iterator
or std::iterator use from their code.
boost::core::verbose_terminate_handler, a utility
function intended to be passed to std::set_terminate
that prints information about the uncaught exception to stderr.
BOOST_DESCRIBE_STRUCT
and updated examples to check std::is_union<T>.
fmtlib
class formatter.
fmtlib
enum formatter.
path::replace_extension
now works in terms of v3 definition
of path::extension rather than v4.
path
or compatible string type. (#223)
fdopendir
and O_NOFOLLOW and
on Windows, remove_all
is now protected against CVE-2022-21658.
The vulnerability is a race condition that allows a third party process
to replace a directory that is being concurrently processed by remove_all with a directory symlink
and cause remove_all
to follow the symlink and remove files in the linked directory instead
of removing the symlink itself. (#224)
remove
and remove_all implementation,
use POSIX semantics for file removal, when supported by the OS (Windows
10 1709 and later). When POSIX semantics is supported, the file name
is removed from the filesystem namespace as soon as the file is marked
for deletion, even if it is still open and in use. With legacy Windows
semantics, the file name remains present in the the filesystem namespace
until the last file handle to the file is closed, which allows the
file marked for deletion to be opened and prevents creating new files
with the same name. (#216)
remove
and remove_all now
support deleting read-only directories. Support for removing read-only
non-directory files was added previously.
directory_iterator
internal implementation has been reworked to better utilize modern
Windows APIs, which may improve performance while handling symlinks.
resize_file
should no longer fail with an error if the file to be resized is
opened.
statx
syscall on Android prior to 11.0 (API version 30). The syscall is
blacklisted by seccomp and causes process termination in runtime.
(#229)
boost/filesystem/string_file.hpp
header is deprecated and will be removed in a future release. The
header is no longer included by boost/filesystem.hpp
by default. Users are advised to implement the functionality themselves
or migrate to other implementations.
integer_log2
implementation to use bit operations internally. This allows to employ
bit instructions available on most modern CPUs. (#31)
boost::io::basic_nullbuf, a null stream buffer,
and boost::basic_onullstream, a null output
stream (Glen Fernandes).
counting_iterator,
added support for built-in 128-bit integer types supported by gcc
and clang and compatible compilers on some target platforms.
counting_iterator.
std::error_code overloads.
boost::source_location to error_codes.
text_file_backend,
added support for appending to a previously written log file,
when file rotation is used and log file names use file counters.
file_collector interface
has changed:
scan_for_files
method returns a scan_result
structure that contains information collected during
the scan;
is_in_storage
method added for testing if a path refers to a file within
the target storage directory.
invoke_manip
stream manipulator that can be used for injecting user's function
into a stream output expression.
text_file_backend::scan_for_files multiple times,
and the second and the following calls don't find any new files.
(#179)
count
operations in ranked indices from O(log(n) + count)
to O(log(n)).
Contributed by Damian Sawicki.
BOOST_USE_WINDOWS_H
and WIN32_LEAN_AND_MEAN
boost::nowide::stat
with boost::nowide::stat_t
boost::get_allocator_pointer to obtain
the Allocator pointer from the result of boost::allocate_unique
(Glen Fernandes).
boost::source_location parameter to throw_exception_from_error.
throw_exception_from_error
overloads for errc::errc_t,
std::error_code, std::errc,
std::exception_ptr.
result<T>::value now automatically supplies
BOOST_CURRENT_LOCATION
to throw_exception_from_error
via a default argument.
errc::make_error_code overload taking
a source location.
boost::throw_with_location, a more lightweight
alternative of BOOST_THROW_EXCEPTION
for programs that do not use Boost.Exception.
count, equal_range
and find.
contains.
erase_if has been
implemented for all containers.
erase and extract.
reserve
to eagerly allocate.
boost::allocator_traits.
operator<<
for monostate.
Boost's primary test compilers are:
Marshall Clow, Michael Caisse and Glen Fernandes managed this release.
Boost is publicly released three times a year in April, August, and December. Each release has updates to existing libraries, and any new libraries that have passed the rigorous acceptance process.
Achievements capture your contributions to Boost — automatically tracked where possible, manually verified for high-value activities.
Badges recognize your journey on Boost — from the contributions you make to the time you've invested and the milestones you've reached along the way.