From 74c922fff6904c42e88adb04f497dff5fa3088dc Mon Sep 17 00:00:00 2001 From: yoh Date: Fri, 3 Feb 2023 23:09:58 +0900 Subject: [PATCH] =?UTF-8?q?expected/expected:=20swap=E4=BF=AE=E6=AD=A3(#10?= =?UTF-8?q?66)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- reference/expected/expected/swap.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/reference/expected/expected/swap.md b/reference/expected/expected/swap.md index 7a270c1f4..8df15366e 100644 --- a/reference/expected/expected/swap.md +++ b/reference/expected/expected/swap.md @@ -25,15 +25,15 @@ constexpr void swap(expected& rhs) noexcept(see below); - [`is_swappable_v`](/reference/type_traits/is_swappable.md)` == true` - [`is_swappable_v`](/reference/type_traits/is_swappable.md)` == true` -- `(`[`is_move_constructible_v`](/reference/type_traits/is_move_constructible.md)` &&` [`is_move_constructible_v`](/reference/type_traits/is_move_constructible.md)`) == true` -- `(`[`is_nothrow_move_constructible_v`](/reference/type_traits/is_nothrow_move_constructible.md)` &&` [`is_nothrow_move_constructible_v`](/reference/type_traits/is_nothrow_move_constructible.md)`) == true` +- `(`[`is_move_constructible_v`](/reference/type_traits/is_move_constructible.md)` &&` [`is_move_constructible_v`](/reference/type_traits/is_move_constructible.md)`) == true` +- `(`[`is_nothrow_move_constructible_v`](/reference/type_traits/is_nothrow_move_constructible.md)` ||` [`is_nothrow_move_constructible_v`](/reference/type_traits/is_nothrow_move_constructible.md)`) == true` ## 効果 `*this`と`rhs`それぞれが正常値/エラー値いずれを保持しているかに応じて、以下の効果を持つ。 -- `*this`と`rhs`ともに正常値を保持していれば、次と等価 : `using std::swap;` [`swap`](/reference/utility/swap.md)`(val, rhs.val);` -- `*this`と`rhs`ともにエラー値を保持していれば、次と等価 : `using std::swap;` [`swap`](/reference/utility/swap.md)`(unex, rhs.unex);` +- `*this`と`rhs`ともに正常値を保持していれば、次と等価 : `using` [`std::swap`](/reference/utility/swap.md)`; swap(val, rhs.val);` +- `*this`と`rhs`ともにエラー値を保持していれば、次と等価 : `using` [`std::swap`](/reference/utility/swap.md)`; swap(unex, rhs.unex);` - `*this`がエラー値を`rhs`が正常値を保持していれば、次と等価 : `rhs.swap(*this);` - `*this`が正常値を`rhs`がエラー値を保持していれば、次と等価 : ```cpp