New libraries
Two new headers, Describe and Lambda2, bring C++14 reflection and dependency‑free lambda utilities.
Two new headers, Describe and Lambda2, bring C++14 reflection and dependency‑free lambda utilities.
Asio gains rvalue handler calls and cached slot expansion, while Filesystem adds larger copy buffers for faster transfers.
Release adds 11 dependencies across 9 libraries and removes 24 dependencies from 11 libraries.
Numerous bug fixes improve Asio cancellation, Filesystem symlink handling, and error_code interoperability for greater stability.
boost::implicit_cast becomes constexpr, atomic factories gain deduction guides, and CI now runs on GitHub Actions.
August 11th, 2021 14:25 GMT
boost::anys::basic_any - a data type with customizable
Small Object Optimization whose instances can hold instances of any
type that satisfies ValueType requirements (many thanks to Ruslan
Arutyunyan @rarutyun). If you are not sure that you really need it,
then use boost::any instead.
associator
trait, used to generically forward associators.
operator&&
and operator||
for awaitable<>,
to allow coroutines to be trivially awaited in parallel.
experimental::as_tuple
completion token adapter.
experimental::append
completion token adapter.
experimental::prepend
completion token adapter.
experimental::deferred
completion token, whicih allows deferred execution of asynchronous
operations.
experimental::parallel_group
class and experimental::make_parallel_group
function.
experimental::promise,
which allows eager execution and synchronisation of asynchronous
operations.
experimental::coro
class template, a C++20 coroutine primitive with the ability to combine
both asynchronous waiting (co_await)
and yielding (co_yield).
ssl::stream<>.
co_spawn
to dispatch the coroutine's
initial step to the executor.
any_executor
and any_io_executor
when used with asynchronous operations.
nodiscard
attribute to awaitable<>.
use_awaitable_t::executor_with_default.
any_io_executor
equality operators to correctly return a result based on the target
executor.
strand<>
to avoid using a potentially moved-from executor.
OPENSSL_NO_SSL_INTERN
is defined.
posix::basic_stream_descriptor move operations
to work with non-defaulted executors.
make_atomic_ref
and make_ipc_atomic_ref
factory functions for constructing atomic reference objects.
atomic_ref and ipc_atomic_ref
to allow omitting template arguments when they can be deduced from
constructor arguments.
boost/core/uncaught_exceptions.hpp has been modified for compatibility
with Mac OS 10.4 and older. (PR#92)
boost::dll::library_info
boost::dll::library_info use info from .dynsym
ELF section if .symtab
is empty or missing
boost::dll::library_info
as they are available for import (#50)
wchar_t
to char on POSIX environment, thanks to Vladislav Shchapov (PR#49)
BOOST_FILESYSTEM_VERSION macro
to either 3 or 4 when compiling their code. There is no need to separately
compile Boost.Filesystem for each library version - a single binary
supports both v3 and v4. Users should avoid using both v3 and v4
in the same application as this can lead to subtle bugs. Currently,
v3 is the default. In a future release v4 will become the default,
and eventually v3 will be removed. v4 is functional, but it is still
a work in progress and there may be breaking API changes in the future.
path::filename,
path::stem and path::extension
no longer consider root name or root directory of the path as a filename
if the path only consists of those components. For example, on Windows
path("C:").filename()
used to return "C:" and path("C:\\").filename() used to return "\" and
both will return an empty path now. (#88, #194)
path::stem
and path::extension no longer treat a filename
that starts with a dot and has no other dots as an extension. Filenames
starting with a dot are commonly treated as filenames with an empty
extension. The leading dot is used to indicate a hidden file on most
UNIX-like systems. (#88)
path("\\\\.\\").stem()
== "\\\\").
It is recommended to use the prefixes only with Boost.Filesystem
v4.
path::lexically_normal implementation
to eliminate some cases of duplicate dot (".") elements
in the normalized paths.
statx and getrandom system calls on Linux.
This can be useful if the syscall is present at compile time but
fails with ENOSYS
at run time (for example, in Docker containers that restrict the
syscall, even if available on the host). (#172)
copy_options::synchronize_data
and copy_options::synchronize
options for the copy_file
operation. These options allow to synchronize the written data and
attributes with the permanent storage. These options are expensive
in terms of performance, but allow to ensure reliability of the copied
data. Note that copy_file
performed implicit data synchronization on POSIX systems since Boost.Filesystem
1.74.0. This release adds support for more platforms and disables
data synchronization by default while allowing the caller to explicitly
request it. (#186)
EINTR
error code on POSIX systems for some system calls issued internally.
In particular, EINTR
could have been ignored on close,
which on HP-UX would result in a leaked file descriptor.
copy_file
implementations based on Linux sendfile
and copy_file_range
system calls, added handling of error codes indicating that a particular
filesystem does not support the system call and fall back to the
generic read/write loop. This should fix copy_file failing on eCryptFS
and possibly other filesystems. (#184)
copy_file_range
system call is now used since Linux kernel 4.5, whereas previously
it was only enabled since 5.3. The copy_file
implementation will fall back to sendfile
or read/write loop if copy_file_range
fails to copy a given file across filesystems.
copy_file implementations
based on Linux sendfile
and copy_file_range
system calls will not be used on filesystems that are known to contain
files with generated content. These system calls are incompatible
with such files, and copying them would result in zero-sized files.
The generic read/write loop will be used instead.
Currently, the blacklisted filesystems are: procfs, sysfs, tracefs
and debugfs.
copy_file
implementation based on read/write loop, increased the maximum
size of the buffer used for temporary storage and take into account
the target filesystem block size for more optimal performance.
current_path
to obtain the current path for a process will now fail with an error
instead of returning successfully with a root path. This platform
does not support current directory. Changing the current path was
already failing similarly in previous releases of Boost.Filesystem.
canonical, fixed
the check for a symlink referencing a directory above root, if an
earlier symlink was resolved to an absolute path with a different
root from the original path.
canonical, added
a limit for the maximum number of symlinks that can be resolved during
the call. The limit is currently at least 40 symlinks.
canonical
and weakly_canonical
will now use path::preferred_separator
for the root directory separator in the resulting paths. This fixes
"file not found" errors caused by Windows API not handling
generic separators in UNC paths and paths that start with the Win32
filesystem prefix ("\\?\"). (#87, #187)
weakly_canonical
overloads taking base
path as an argument.
weakly_canonical
no longer fails with an error if the input path contains elements
that do not exist in the filesystem but are cancelled by a subsequent
dot-dot ("..") element. For example, weakly_canonical("C:\\a\\..") would previously fail if "C:\a"
directory did not exist. (#201)
read_symlink on
Windows, corrected reparse point handling. The operation would return
an empty path for some mount points (for example, created by Box cloud storage driver) and
directory junction points that had empty print names. The new implementation
now parses substitute name of the reparse point and attempts to reconstruct
a Win32 path from it. (#187)
boost/filesystem/fstream.hpp
will use wide character paths on libc++ versions 7.0 and higher,
when the standard library supports opening files with wide character
paths. (#181)
path::imbue. The supported compilers
include MSVC, GCC and Clang, as well as other compilers that support
customizing program initialization order through #pragma
section (for MSVC-compatible
compilers) or __attribute__
((init_priority)) (for GCC-compatible compilers).
value_to supports
TupleLike types.
value_to and value_from support std::array and similar types.
string
to std::string_view.
std::hash specializations for json types.
object
and key_value_pair.
array
from a pair of iterators that form an empty range.
mp_intersperse,
mp_split, mp_join
iostream
classes before main
(best effort, works for most environments)
rdbuf
in cin/cout/cerr for redirected input/output
cin::unget() after using putback()
close
of filebuf after
move assignment
utf8_codecvt
boost::pfr::hash_value()
error_category
to std::error_category has been improved
and no longer requires <map>
or <mutex>.
error_category
are now inline friends instead of member functions (a side effect
of the previous change.)
error_condition now
defers calling generic_category() to avoid instantiating the object
until it's actually needed.
error_condition::failed and error_condition::message
have been undeprecated, and operator
bool()
now once again returns failed().
generic_category(), to avoid instantiating the object.
default_error_condition
changes in some cases into an error_condition
from the generic category, instead of from the system category. This
happens on POSIX when the input error_code
is from the system category and does not correspond to any errc_t value.
error_code
and std::error_code has been improved substantially.
It is now possible to construct boost::system::error_code
from std::error_code, and it's possible to
pass boost::system::error_code to functions taking
std::error_code&.
error_condition
has been added.
to_chars for
writing uuid strings without allocating (PR#116)
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.