Skip to content

Commit 6b609be

Browse files
committed
表周りの修正
1 parent ac864c9 commit 6b609be

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

lang/cpp23/simpler_implicit_move.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,9 @@ auto f() -> int&& {
168168

169169
|関数宣言と`return`|C++20まで|C++23から|備考|
170170
|---|:-:|:-:|---|
171-
|`auto f(T x) -> decltype(x) { return x; }` |`T` : 〇|`T` : 〇||
171+
|`auto f(T x) -> decltype(x) { return x; }` |`T` : 〇|||
172172
|`auto f(T x) -> decltype((x)) { return (x); }` |`T&` : 〇|`T&` : **×**|ローカル参照を返していた|
173-
|`auto f(T x) -> decltype(auto) { return x; }` |`T` : 〇|`T` : 〇||
173+
|`auto f(T x) -> decltype(auto) { return x; }` |`T` : 〇|||
174174
|`auto f(T x) -> decltype(auto) { return (x); }` |`T&` : 〇|**`T&&` :**|ローカル参照を返す|
175175
|`auto f(T&& x) -> decltype(x) { return x; }` |`T&&` : ×|`T&&` : ****||
176176
|`auto f(T&& x) -> decltype((x)) { return (x); }` |`T&` : 〇|`T&` : **×**||
@@ -181,7 +181,11 @@ auto f() -> int&& {
181181
|`auto f(T&& x) -> auto&& { return x; }` |`T&` : 〇|**`T&&` :**|`x`がローカル変数の場合ローカル参照を返す|
182182
|`auto f(T&& x) -> auto&& { return (x); }` |`T&` : 〇|**`T&&` :**|`x`がローカル変数の場合ローカル参照を返す|
183183

184-
右側2列の各項目内は、推論される戻り値型:コンパイル可否、のように記述しており、コンパイル可否は、〇が適格(コンパイルが通る)、×が不適格(コンパイルエラー)を表す。
184+
表の中2列の各項目内は、推論される戻り値型:コンパイル可否、のように記述している。また、表中の記号の意味は次のとおり
185+
186+
- 〇 : 適格(コンパイルが通る)
187+
- × : 不適格(コンパイルエラー)
188+
- ― : 変化なし
185189

186190
##
187191

0 commit comments

Comments
 (0)