From 6156076dab209ab6fd4c491937fdc5b1b28c850a Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Thu, 16 Sep 2021 18:13:55 +0300 Subject: [PATCH] Specify assign in terms of construction and assignment --- doc/system/reference.adoc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/doc/system/reference.adoc b/doc/system/reference.adoc index ba6fdc4..ee06a60 100644 --- a/doc/system/reference.adoc +++ b/doc/system/reference.adoc @@ -721,7 +721,7 @@ constexpr void assign( int val, const error_category & cat ) noexcept; [none] * {blank} + -Ensures: :: `value() == val`; `category() == cat`; `!has_location()`. +Effects: :: `*this = error_code( val, cat );`. ``` void assign( int val, const error_category & cat, @@ -730,8 +730,7 @@ void assign( int val, const error_category & cat, [none] * {blank} + -Requires: :: `loc` points to a valid `boost::source_location` object with static storage duration. -Ensures: :: `value() == val`; `category() == cat`; `has_location()`; `&location() == loc`. +Effects: :: `*this = error_code( val, cat, loc );`. ``` template @@ -749,8 +748,8 @@ constexpr void clear() noexcept; [none] * {blank} + -Ensures: :: - `value() == 0`; `category() == system_category()`. +Effects: :: + `*this = error_code();`. #### Observers