Skip to content

Commit

Permalink
variantが追加の動的メモリ確保を行わないことを説明する文を修正
Browse files Browse the repository at this point in the history
「スタック領域のみを使用する」かどうかはvariant自身がスタック領域に置かれているかによるため、「オブジェクト表現内に直接割り当てる」という表現に修正。
  • Loading branch information
sakujiro-inagaki committed Feb 25, 2023
1 parent 16e1d97 commit 9116a93
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion reference/variant/variant.md
Expand Up @@ -43,7 +43,7 @@ std::visit([](auto& x) {

このクラスと同様のことは共用体を使用しても達成できるが、このクラスはより使いやすいよう設計されている。

このクラスは動的メモリ確保は行わず、スタック領域のみを使用する
このクラスは追加の動的メモリ確保は行わず、保持するオブジェクトを自身のオブジェクト表現内に直接割り当てる


### 備考
Expand Down

0 comments on commit 9116a93

Please sign in to comment.