////
Copyright 2018-2022 Peter Dimov
Distributed under the Boost Software License, Version 1.0.
https://www.boost.org/LICENSE_1_0.txt
////

[#changes]
# Revision History
:idprefix:

## Changes in Boost 1.81

* The macro `BOOST_SYSTEM_DISABLE_THREADS` can now be defined to disable
  the use of `<mutex>` (e.g. on single-threaded libstdc++).
* Added `value_type`, `error_type`, `in_place_value`, `in_place_error`
  to `result<>`.
* Added `emplace` to `result<>`.

## Changes in Boost 1.80

* When an `error_code` is converted to `std::error_code` and then back
  to `error_code`, the original is now restored, if possible.
* Reworked the conversion from `error_category` to `std::error_category`
  to avoid the one-time allocation that shows up on leak checkers.
* Added a constructor that allows replacing the source location of an
  `error_code`, and a corresponding `assign`.
* Added a converting constructor to `result`.

## Changes in Boost 1.79

* Added a `boost::source_location` parameter to `throw_exception_from_error`.
* Added `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.
* Added an `errc::make_error_code` overload taking a source location.

## Changes in Boost 1.78

* Added support for source locations to `error_code`.
* Added `error_code::to_string`, `error_condition::to_string`, `error_code::what`.
* `system_error::what()` now contains the source location, if present.
* Added `result<T, E = error_code>`, a class holding either a value or an
  error, defined in `<boost/system/result.hpp>`.

## Changes in Boost 1.77

* The conversion operator from `error_category` to `std::error_category`
  has been improved and no longer requires `<map>` or `<mutex>`.
* The comparison operators of `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()`.
* The system category now doesn't call `generic_category()`, to avoid
  instantiating the object.
* The return value of `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.
* The interoperability of `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&`.
* A stream insertion operator for `error_condition` has been added.

## Changes in Boost 1.76

* `windows_error.hpp` is no longer deprecated.

## Changes in Boost 1.75

* The platform-specific headers `windows_error.hpp`, `linux_error.hpp`,
  and `cygwin_error.hpp` emit deprecation messages and are slated for
  removal.
* The old names for `generic_category()` and `system_category()` emit
  deprecation messages and are slated for removal.
* `error_condition::failed` is deprecated and is slated for removal.
  `operator bool()` for `error_condition` has been reverted to its old
  meaning of `value() != 0`. This is done for compatibility with
  `std::error_condition` as the next release is expected to improve
  interoperability with `<system_error>` even further. _Note that this
  does not affect_ `error_code::failed`, which is still alive and well.
* The overload of `error_condition::message` that takes a buffer is
  deprecated and is slated for removal, for the same reasons. _Note that
  this does not affect_ `error_code::message`.

## Changes in Boost 1.74

* `operator bool()` now returns `failed()` instead of `value() != 0`.

## Changes in Boost 1.69

* Boost.System is now header-only. A stub library is still built for
  compatibility, but linking to it is no longer necessary.
* Even more functions have been marked `constexpr`.
* The destructor of `error_category` is now protected and no longer
  virtual. This is a _potentially breaking change_ but its impact
  is expected to be limited.
* `error_category` now has a constructor that accepts a 64 bit identifier,
  enabling distinct category objects to compare equal.
* The constructors of `error_category` are now protected.
* A non-allocating, nonthrowing overload of `message` has been added.
* A virtual function `failed` has been added, allowing categories for
  which success is not synonymous with 0.
* The deprecated `boost::system::throws` object has been removed.
* `boost::throws()` is now deprecated and its use is discouraged.
* The constructor of `system_error` taking a single `error_code` argument
  is now explicit.
* `system_error::code()` now returns by value.

## Changes in Boost 1.68

On a {cpp}14 compiler, many Boost.System functions and member functions
are now `constexpr`, and `error_code` and `error_condition` are literal
classes.

In addition to enabling use in constant expressions (and `constexpr`
functions), this significantly improves the quality of the generated code.

As a result of this change, however, now using Boost.System from {cpp}14
or {cpp}17 code requires that the library be also built with {cpp}14 or
above. This is the default on GCC 6 and newer, but not on GCC 5 or Clang.
One can build Boost for {cpp}14 by passing the `cxxstd=14` option to `b2`.

(Previous versions allowed code built against any {cpp} standard to link
with Boost.System built against any {cpp} standard. In 1.68, code using
any {cpp} standard can link with Boost.System built with {cpp}14 or above,
but if Boost.System is built with {cpp}11 or below, only code also built
with {cpp}11 and below can link to it successfully.)

## Changes in Boost 1.65

On a {cpp}11 compiler, Boost.System now provides implicit conversions
from `boost::system::error_category`, `error_code`, and `error_condition`
to their standard equivalents from `<system_error>`.

This allows libraries to expose a {cpp}11 interface and report errors
via `std::error_code` even when using Boost.System, directly or through a
dependency such as Boost.ASIO.
