From 8fd487d4966159d15716d7ac1e197069d17ba810 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Sun, 19 Jun 2022 01:28:36 +0300 Subject: [PATCH] Update documentation --- doc/system/reference.adoc | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/doc/system/reference.adoc b/doc/system/reference.adoc index 5ff3882..231410c 100644 --- a/doc/system/reference.adoc +++ b/doc/system/reference.adoc @@ -1608,6 +1608,12 @@ public: template constexpr result( in_place_error_t, A&&... a ); + template + constexpr result( result const& r2 ); + + template + constexpr result( result&& r2 ); + // queries constexpr bool has_value() const noexcept; @@ -1716,6 +1722,30 @@ Ensures: :: Remarks: :: This constructor is only enabled when `std::is_constructible::value` is `true`. +``` +template + constexpr result( result const& r2 ); +``` +[none] +* {blank} ++ +Ensures: :: + If `r2.has_value()` is `true`, `*this` holds the value `T( *r2 )`, otherwise `*this` holds the value `E( r2.error() )`. +Remarks: :: + This constructor is only enabled when `std::is_convertible::value && std::is_convertible::value` is `true`. + +``` +template + constexpr result( result&& r2 ); +``` +[none] +* {blank} ++ +Ensures: :: + If `r2.has_value()` is `true`, `*this` holds the value `T( std::move( *r2 ) )`, otherwise `*this` holds the value `E( r2.error() )`. +Remarks: :: + This constructor is only enabled when `std::is_convertible::value && std::is_convertible::value` is `true`. + #### Queries ```