New libraries
Added STLInterfaces, a CRTP‑based suite for simplifying STL views, iterators, and sequence containers.
Added STLInterfaces, a CRTP‑based suite for simplifying STL views, iterators, and sequence containers.
Optimized Asio executors, made atomic_flag 32‑bit, and sped up copy_file via sendfile/copy_file_range.
Added six dependencies across four libraries and removed twelve dependencies across nine libraries.
Fixed Windows I/O completion port deadlock, numerous async and handler bugs, and improved filesystem symlink handling.
Added C++20 coroutine support, constexpr YAP, source‑location tracking, and new tools handlerlive.pl and handlertree.pl.
August 14th, 2020 05:02 GMT
any_io_executor
type alias has been introduced as the default runtime-polymorphic
executor for all I/O objects. This defaults to the execution::any_executor<>
template. If required for backward compatibility, BOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT
can be defined to use the old asio::executor
polymorphic wrapper instead.
BOOST_ASIO_NO_TS_EXECUTORS.
basic_waitable_timer.
co_spawn
that launch an awaitable.
use_awaitable_t's
default executor adapter, to enable conversion between executor types.
detached_t
as a default completion token, by adding members as_default_on() and as_default_on_t<>.
ssl::stream<>.
ssl::stream<>
write operations to linearise gather-write buffer sequences.
asio_handler_invoke,
asio_handler_allocate,
and asio_handler_deallocate
hooks, when BOOST_ASIO_NO_DEPRECATED
is defined.
async_compose
to work with copyable handlers when passed by lvalue.
co_spawn.
Executor
base class from the executor_binder
implementation.
const
qualifiers to some operations in atomic_ref.
yield
instruction on ARMv8-A. The instruction is used internally in spin
loops to reduce CPU power consumption.
has_native_wait_notify,
a static boolean constant always_has_native_wait_notify
and a set of capability macros that allow to detect if the implementation
supports native waiting and notifying operations for a given type.
atomic_flag
to use 32-bit storage. This allows for more efficient waiting and
notifying operations on atomic_flag
on some platforms.
BOOST_ATOMIC_LOCK_POOL_SIZE_LOG2
macro to specify binary logarithm of the size of the lock pool. The
default value is 8, meaning that the size of the lock pool is 256,
up from 64 used in the previous release.
ipc_atomic_flag,
ipc_atomic and ipc_atomic_ref. Users are recommended
to port their code using non-IPC types for inter-process communication
to the new types. The new types provide the same set of operations
as their non-IPC counterparts, with the following differences:
is_lock_free returns true for the given atomic object.
The library will issue a compile time error if this precondition
is known to be not satisfied at compile time.
ipc_atomic_ref
- the referenced object) may be located in process-shared memory
or mapped into the same process at multiple different addresses.
has_native_wait_notify
operation and always_has_native_wait_notify
constant indicate support for native inter-process waiting
and notifying operations. When that support is not present,
the operations are implemented with a busy loop, which is less
efficient, but still is address-free. A separate set of capability
macros is also provided to indicate this support.
atomic_unsigned_lock_free
and atomic_signed_lock_free
types introduced in C++20. The types indicate the atomic object type
for an unsigned or signed integer, respectively, that is lock-free
and preferably has native support for waiting and notifying operations.
lock-prefixed
instructions instead of mfence.
This means that the operations no longer affect non-temporal stores,
which was also not guaranteed before. Use specialized instructions
and intrinsics to order non-temporal memory accesses.
long
double on x86 targets not
indicating lock-free operations even if 128-bit atomic operations
were available.
__sync* intrinsics backend, fixed that store
and load operations of large objects (larger than a pointer size)
could be non-atomic. The implementation currently assumes that small
objects can be stored with a single instruction atomically on all
modern architectures.
BOOST_ASIO_NO_DEPRECATED.
Define this to help identify areas of your Beast and Asio code which
use deprecated Asio interfaces.
BOOST_ASIO_NO_TS_EXECUTORS.
Define this to identify uses of executors from the now potentially
outdated Networking
TS
BOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT
in which the Networking TS model will be used by default. Setting
this flag does not prevent a program from using executors from the
Standard Executors model explicitly.
BOOST_NO_CXX11_OVERRIDE
and BOOST_OVERRIDE.
(Glen Fernandes)
allocator_traits
with individual traits and functions for each facility. They support
the C++11 allocator model when possible and provide a fallback for
C++98 compatibility. These are now used in Circular_Buffer, Wave,
Lockfree, Heap, Smart_Ptr, Dynamic_Bitset, Format, Bimap and more.
(Glen Fernandes)
endian_reverse.
bool, enum, float,
double in endian_reverse_inplace.
endian_reverse_inplace
for arrays.
canonical
and read_symlink
on Windows. This also affects other algorithms that involve canonical and read_symlink
in their implementation. (PR#100, #85, #99,
#123, #125)
read_symlink
on Windows could potentially fail or cause failures elsewhere with
a sharing violation error, if the same symlink was opened concurrently.
(#138)
is_symlink(directory_entry) would always return false, even if the directory entry
actually referred to a symlink. (PR#148)
directory_entry and error_code (e.g. is_directory(directory_entry,
error_code&)).
Removed incorrect noexcept
specifications for the overloads not taking the error_code
arguments.
copy_file implementation
has been updated to perform checks on the source and target files,
as required by C++20 ([fs.op.copy.file]/4.1). In particular, the
operation will fail if the source or target file is not a regular
file or the source and target paths identify the same file.
copy_file on POSIX
systems will now also copy the source file permissions to the target
file, if the target file is overwritten.
copy_file
implementations based on sendfile
and copy_file_range
system calls on Linux, which may improve file copying performance,
especially on network filesystems.
copy_option
enumeration that is used with the copy_file
operation is deprecated. As a replacement, the new enum copy_options (note the trailing
's') has been added. The new enum contains values similar to the
copy_options enum
from C++20. The old enum values are mapped onto the new enum. The
old enum will be removed in a future release.
copy_options::skip_existing
option, which allows copy_file
operation to succeed without overwriting the target file, if it exists.
copy_options::update_existing
option, which allows copy_file
operation to conditionally overwrite the target file, if it exists,
if its last write time is older than that of the replacement file.
copy_file
now returns bool, which
indicates whether the file was copied.
copy operation has been extended
and reworked to implement behavior specified in C++20 [fs.op.copy].
This includes support for copy_options::recursive,
copy_options::copy_symlinks, copy_options::skip_symlinks,
copy_options::directories_only, copy_options::create_symlinks and copy_options::create_hard_links options. The
operation performs additional checks based on the specified options.
Applying copy to
a directory with default copy_options
will now also copy files residing in that directory (but not nested
directories or files in those directories).
create_directory
overload taking two paths. The second path is a path to an existing
directory, which is used as a source of permission attributes to
use in the directory to create.
copy_directory
operation has been deprecated in favor of the new create_directory
overload. Note that the two operations have reversed order of the
path arguments.
equivalent on POSIX
systems now returns the actual error code from the OS if one of the
paths does not resolve to a file. Previously the function would return
an error code of 1. (#141)
equivalent no longer
considers file size and last modification time in order to test whether
the two paths refer to the same file. These checks could result in
a false negative if the file was modified during the equivalent call.
absolute
overloads taking error_code
argument.
current_path() as the default value of their arguments
and also have an error_code
argument will use the current_path(error_code& ec) overload to obtain the current path,
so that its failure is reported via the error_code
argument instead of an exception.
space now initializes
the space_info structure
members to -1 values on error, as required by C++20 ([fs.op.space]/1).
space on Windows
now accepts paths referring to arbitrary files, not only directories.
This is similar to POSIX systems and corresponds to the operation
description in C++20. (#73)
temp_directory_path for Windows
CE. (PR#25)
unique_path operation based on
getrandom (Linux),
arc4random_buf (OpenBSD/FreeBSD/CloudABI)
and BCrypt (Windows) system APIs.
image
constructor from other image (PR#477).
plane_view_t
is not a class or namespace name (PR#481).
interleaved_view
factory using point<std::ptrdiff_t> for dimension (PR#487).
numeric/kernel.hpp
to make it self-contained (PR#502).
skew_heap.
(Glen Fernandes)
gcd
in C++20 mode with clang 10.
ip_version named parameter
on the sink backend construction (by default, IPv4 is assumed).
When an address is obtained as a result of host name resolution,
only addresses with matching IP version are considered. (#119)
noexcept.
range_manip
stream manipulator that can be used for outputting elements
of a range, optionally separated by a delimiter.
tuple_manip
stream manipulator that can be used for outputting elements
of a tuple or any other heterogeneous sequence, optionally
separated by a delimiter.
optional_manip
stream manipulator that can be used for outputting optionally
present values.
mp_with_index<N> for large N.
tuple_transform
(contributed by Hans Dembinski.)
boost::nowide::utf namespace
stat
with UTF-8 paths
better_optimisation.
This branch has a number of major breaking changes to Outcome
v2.1, see the front page for details.
void
results and outcomes no longer default construct types during
explicit construction. Previously if you explicitly constructed
a result<T>
from a non-errored result<void>, it default constructed
T. This was
found to cause unhelpful surprise, so it has been disabled.
OUTCOME_ENABLE_LEGACY_SUPPORT_FOR.
The macro OUTCOME_ENABLE_LEGACY_SUPPORT_FOR
can be used to enable aliasing of older naming and features
to newer naming and features when using a newer version of
Outcome.
OUTCOME_ENABLE_LEGACY_SUPPORT_FOR
is set to 210 or
lower.
OUTCOME_V2_NAMESPACE::concepts
namespace. Previously concepts lived in the convert
namespace, now they live in their own namespace.
basic_result<T> and basic_outcome<T> added. End users were finding
an unhelpful gap in between is_basic_result<T> and value_or_error<T> where they wanted a concept
that matched types which were basic_result,
but not exactly one of those. Concepts filling that gap were
added.
TRY
works differently from Outcome v2.2 onwards. This is a severely
code breaking change which change the syntax of how one uses
OUTCOME_TRY(). A regular expression suitable
for upgrading code can be found in the list of changes between
Outcome v2.1 and v2.2.
noexcept(std::is_constructible<T,
void>)
failing to compile which I originally submitted years ago.
So give up waiting on Apple to fix their clang, add a workaround
to Outcome.
boost::type_erasure::any
and boost::any (issue #17).
owner_equals
to shared_ptr, weak_ptr, local_shared_ptr.
owner_hash_value
to shared_ptr, weak_ptr.
owner_equal_to,
owner_hash.
std::hash specializations for shared_ptr, local_shared_ptr.
boost::hash support to, and std::hash, std::equal_to
specializations for, weak_ptr.
-fno-exceptions (thanks to Jeremiah
Rodriguez #91).
operator bool() now returns failed() instead of value() != 0.
conjunction,
disjunction, negation, is_trivially_copyable,
is_scoped_enum, and
is_unscoped_enum.
(Glen Fernandes)
visit.
visit<R>.
__VA_OPT__
(PR#75)
__has_include
(PR#102)
check_macro_naming,
useful with Boost itself (PR#97)
std::allocator
member removal in C++20 (PR#72)
token_statistics
sample (PR#79)
Boost's primary test compilers are:
Boost's additional test compilers include:
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.