Skip to content

Commit ea19ead

Browse files
committed
feat: Change variant reference from boost to C++17
cf. hmemcpy/milewski-ctfp-pdf#400 訳注は不要になるので削除する。
1 parent 587640d commit ea19ead

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

english/part1/ch05.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ Contact PhoneNum(int n) {
330330
\noindent
331331
It injects an integer into `Contact`.
332332

333-
A tagged union is also called a [*variant*]{.keyword #variant}\index{variant}, and there is a very general implementation of a variant in the boost library, `boost::variant`.
333+
A tagged union is also called a [*variant*]{.keyword #variant}\index{variant}, and there is a very general implementation of a variant in the C++17 standard, `std::variant`.
334334

335335
In Haskell, you can combine any data types into a tagged union by separating data constructors with a vertical bar. The `Contact` example translates into the declaration:
336336

japanese/part1/ch05.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ Contact PhoneNum(int n) {
334334
\noindent
335335
これは`Contact`に整数を注入 (inject) する。
336336

337-
タグ付き共用体は[*variant*]{.keyword #variant}\index{variant}とも呼ばれ、boostライブラリーに非常に汎用的な`boost::variant`という実装がある^[訳注:C++17以降では`std::variant`が利用できる。]
337+
タグ付き共用体は[*variant*]{.keyword #variant}\index{variant}とも呼ばれ、C++17標準に非常に汎用的な`std::variant`という実装がある
338338

339339
Haskellでは、データ構成子を縦棒で区切ることで、任意のデータ型をタグ付き和にまとめられる。`Contact`の例だと次のような宣言になる。
340340

0 commit comments

Comments
 (0)