From 01676ae42f42324020123acb08f6d92b22701ef2 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Sat, 2 Oct 2021 14:47:07 +0300 Subject: [PATCH] Update documentation --- doc/system/changes.adoc | 2 +- doc/system/reference.adoc | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/doc/system/changes.adoc b/doc/system/changes.adoc index 6232fe1..3caa1c2 100644 --- a/doc/system/changes.adoc +++ b/doc/system/changes.adoc @@ -11,7 +11,7 @@ https://www.boost.org/LICENSE_1_0.txt ## Changes in Boost 1.78 * Added support for source locations to `error_code`. -* Added `error_code::to_string`, `error_condition::to_string`. +* Added `error_code::to_string`, `error_condition::to_string`, `error_code::what`. * `system_error::what()` now contains the source location, if present. * Added `result`, a class holding either a value or an error, defined in ``. diff --git a/doc/system/reference.adoc b/doc/system/reference.adoc index 63fb77e..b544177 100644 --- a/doc/system/reference.adoc +++ b/doc/system/reference.adoc @@ -668,6 +668,10 @@ public: template friend std::basic_ostream& operator<<( basic_ostream& os, const error_code & ec ); + + // what + + std::string what() const; }; // non-member functions @@ -1054,6 +1058,18 @@ template Effects: :: `os << to_string()`. Returns: :: `os`. +#### what + +``` +std::string what() const; +``` +[none] +* {blank} ++ +Returns: :: A string representation of `*this`, suitable for logging and + diagnostic output. Typically incorporates `message()`, `to_string()`, and + `location().to_string()` (if available.) + #### Nonmembers ```