New libraries
Two new libraries, charconv and scope, add high‑quality conversions and scope‑guard utilities.
Two new libraries, charconv and scope, add high‑quality conversions and scope‑guard utilities.
lexical_cast rewrite and unordered::emplace optimizations boost speed and reduce template instantiation overhead.
Added 9 new dependencies and removed 11 across 6 and 8 libraries respectively.
Numerous bug fixes and stability patches address crashes, UB, and incorrect error handling throughout the ecosystem.
New result<T> API, stacktrace from exceptions, and added core::functor.hpp improve ergonomics and error transport.
April 15th, 2024 17:38 GMT
These are patches from library authors which were found too late to be fixed in the release.
async_result
primary template's concept checking to correctly handle lvalue-qualified
completion signatures.
bind_allocator, bind_executor,
bind_immediate_executor
and bind_cancellation_slot
completion token adapters to adapt each other.
experimental::ranged_parallel_group
operation so that it moves the completion_order
vector when invoking the completion handler.
ip::basic_resolver_query, io_context::strand, and coroutine.
co_spawn to
correctly propagate exceptions resulting from cancellation to the
completion handler.
std::launder
to fix undefined behaviour in awaitable<> internal storage.
file_base::append
flag in the Windows implementation of file support.
fcntl
if a call to ioctl
fails.
experimental::coro were both used in the same
translation unit.
pause
instruction on RISC-V. (PR#65)
buffers_cat.hpp.
websocker_server_awaitable
example.
async_write
in advanced server examples.
SSL_set_tlsext_host_name().
asio::associator is specialized
for bind_wrapper
and bind_front_wrapper.
http::message::prepare_payload() is optional.
basic_stream::expires_after().
teardown()
and async_teardown() are customization points.
http::serializer
after first usage is undefined behaviour.
websocket::permessage_deflate should
be configured before performing the WebSocket handshake.
bytes_transferred
in http reads operations reports the number of bytes consumed
by the HTTP parser.
boost::lexical_cast
that is not part of the library any more. Thanks to Danil
Sidoruk for the PR PR#28!
boost/core/functor.hpp
header with a functor
class template for wrapping a raw function into a function object
class.
null_deleter,
fclose_deleter and
checked deleter definitions so that they don't bring namespace boost into argument-dependent lookup.
Users may need to either explicitly qualify the namespace of the
called function or add a using-declaration.
path::generic_path and path::generic_string methods now remove
duplicate directory separators in the returned paths.
path::generic_path,
path::generic_string, path::make_preferred
and path::lexically_normal avoid converting
between backslashes and forward slashes in path root names. For example,
on Windows, path("\\\\\\\\?\\\\c:\\\\foo").generic_string() now returns "\\?\c:/foo"
instead of "//?/c:/foo". Similarly, path("\\\\\\\\host/share/foo/..").lexically_normal() now returns "\\host\share".
equivalent
now indicates error if either one of the paths doesn't exist.
absolute
now returns a path with a trailing directory separator when the input
path has an empty relative_path(). (#301)
unique_path
overload taking a single error_code& ec
argument. The overload generates a unique path using the default
path model.
weakly_canonical
now produces an absolute path if the input path is relative and contains
no elements that exist in the filesystem. (#300)
copy_options::ignore_attribute_errors
option for copy_file
and copy operations.
The new option allows to ignore possible errors while copying file
attributes. (#179)
copy_file
backends based on sendfile
and copy_file_range
system calls will attempt to preallocate storage for the target file.
This may reduce filesystem fragmentation and provide early error
indication if there is not enough free space. Not all filesystems
support this feature; file copying proceeds if storage preallocation
is not supported.
fdopendir, openat and related APIs defined
in POSIX.1-2008, as well as on Windows, recursive_directory_iterator
now uses file descriptors/handles instead of paths to query the file
statuses and open nested directories during iteration. This makes
directory iteration more resilient to concurrent modifications of
the filesystem.
path and recursive_directory_iterator member
functions, is_regular,
copy_directory,
symbolic_link_exists,
complete, copy_option, symlink_option,
as well as boost/filesystem/convenience.hpp
and boost/filesystem/path_traits.hpp headers were removed. Possible
replacements for the removed components are mentioned in the documentation.
path
construction, assignment and appending from container types (e.g.
std::vector<char>)
is now disabled by default. Users can still enable this functionality
by defining BOOST_FILESYSTEM_DEPRECATED.
This functionality remains deprecated and will be completely removed
in a future release.
visit.
try_capture_all.
result<T>
able to transport exceptions captured via try_capture_all.
result<T>
transporting dynamically captured error objects with improved efficiency.
make_shared_context/capture APIs are deprecated, will
be removed in the next release.
std::char_traits
(do not use custom traits from input/output types as it leads
to linktime or runtime errors);
volatile
input types was dropped, following the C++ Standard Library
trend.
-fno-sanitize-recover=integer #45.
char8_t
in C++20 mode
collator now throws
on construction, if at all, as documented
collator no longer
derives from std::collator
to avoid possible type confusing when it isn't available for the
current backend PR#216
date_time
to seconds as milliseconds where not easily available causing confusion
#221
any_connection
class). any_connection
is not a template and features simpler connection establishment and
reconnection semantics.
format_sql
and format_sql_to).
These allow securely composing queries client-side, which enables
patterns like batch inserts, dynamic filters or PATCH-like updates.
close_statement
and async_close_statement
that could cause significant delays in application code.
BOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT.
connection::query,
connection::start_query, connection::execute_statement,
connection::start_statement_execution and their
async counterparts) now triggers warnings, as it's scheduled for
removal in Boost 1.86.
-Wall
and -Wextra.
field_view constructors
are now stable.
boost::pfr::get_name now can work with local
types on some compilers. Thanks to Bela
Schaum for the PR PR#152!
boost::pfr::structure_to_tuple.
Thanks to Denis Mikhailov
for the bug report #155.
boost/system/cygwin_error.hpp
has been removed.
operator&
now works for result<void> (by way of taking a nullary function.)
operator|=
for result.
std::stacktrace::from_current_exception() now returns the stacktrace of the
current exception object as if the stacktrace was captures at the
point of throwing the exception. Many thanks to Andrei Nekrashevich
for prototyping the idea in libsfe.
boost_stacktrace_windbg.
Thanks to ycyclop
for reporting the issue #111, to Thiago
A. Correa for providing more information, to Andrei
Karpovskii for providing a possible fix.
iterator_interface
for input iterators in C++20 and later, to more closely follow the
C++20 concepts.
iterator_interface
to fix errors about concepts being redefined with different constraints.
v3 inline
namespace, containing a new iterator_interface based on deducing
this instead of CRTP (C++23 and later).
closure::operator(), to prevent dangling temporaries.
emplace() for a value_type
or init_type (if
applicable) argument to bypass creating an intermediate object. The
argument is already the same type as the would-be intermediate object.
emplace() for k,v
arguments on map containers to delay constructing the object until
it is certain that an element should be inserted. This optimization
happens when the map’s key_type
is move constructible or when the k
argument is a key_type.
const
version of unordered_multimap::find(k, hash, eq) (PR#238).
Boost's primary test compilers are:
Marshall Clow 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.