From b39f239b3db53497b2c22c79ef82fbf95568fdb6 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Sun, 19 Sep 2021 15:53:13 +0300 Subject: [PATCH] Update documentation --- doc/system/changes.adoc | 2 +- doc/system/reference.adoc | 17 ++++++++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/doc/system/changes.adoc b/doc/system/changes.adoc index d872f35..6232fe1 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`. +* Added `error_code::to_string`, `error_condition::to_string`. * `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 c1830e1..ee6e72f 100644 --- a/doc/system/reference.adoc +++ b/doc/system/reference.adoc @@ -1096,6 +1096,10 @@ public: operator std::error_condition() const; + // to_string + + std::string to_string() const; + // stream insertion template @@ -1284,6 +1288,17 @@ operator std::error_condition() const; Returns: :: `std::error_condition( value(), category() )`. +#### to_string + +``` +std::string to_string() const; +``` +[none] +* {blank} ++ +Returns: :: The concatenation of `"cond:"`, `category().name()`, `':'`, + and the string representation of `value()`. + #### Stream Insertion ``` @@ -1294,7 +1309,7 @@ template [none] * {blank} + -Effects: :: `os << "cond:" << en.category().name() << ':' << en.value()`. +Effects: :: `os << en.to_string()`. Returns: :: `os`.