From 05ee2e647ca2e59498eb1743056925969eeb6e7f Mon Sep 17 00:00:00 2001 From: tshino Date: Sat, 4 Nov 2023 19:40:21 +0900 Subject: [PATCH] =?UTF-8?q?std::exchange=E3=81=8C=E5=B8=B8=E3=81=AB?= =?UTF-8?q?=E3=83=A0=E3=83=BC=E3=83=96=E4=BB=A3=E5=85=A5=E3=81=99=E3=82=8B?= =?UTF-8?q?=E3=82=88=E3=81=86=E3=81=AA=E8=A8=98=E8=BF=B0=E3=81=AE=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- reference/utility/exchange.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reference/utility/exchange.md b/reference/utility/exchange.md index 5f14d92127..8736609591 100644 --- a/reference/utility/exchange.md +++ b/reference/utility/exchange.md @@ -24,7 +24,7 @@ namespace std { ## 効果 -第1パラメータ`obj`で受け取った変数への参照に、第2パラメータ`new_val`の値をムーブ代入し、代入前の`obj`の状態を返す。 +第1パラメータ`obj`で受け取った変数への参照に、第2パラメータ`new_val`の値をコピー代入または可能ならムーブ代入し、代入前の`obj`の状態を返す。 以下と等価の効果を持つ: @@ -215,4 +215,4 @@ Hello 0x7ffc560ca4cc - [P0202R3 Add Constexpr Modifiers to Functions in `` and `` Headers](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0202r3.html) - [`std::exchange` Patterns: Fast, Safe, Expressive, and Probably Underused](https://www.fluentcpp.com/2020/09/25/stdexchange-patterns-fast-safe-expressive-and-probably-underused/) - [`std::exchange`によるmoveしてリセットするイディオムの御紹介](https://onihusube.hatenablog.com/entry/2020/10/31/163244) -- [P2401R0 Add a conditional noexcept specification to std::exchange](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p2401r0.html) \ No newline at end of file +- [P2401R0 Add a conditional noexcept specification to std::exchange](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p2401r0.html)