Skip to content

Commit

Permalink
Update std.md
Browse files Browse the repository at this point in the history
"この機能が必要になった背景・経緯"を追加
  • Loading branch information
tetsurom authored Mar 31, 2024
1 parent fef3ffc commit afd10bb
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion module/std.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,23 @@ int main() {
}
```

グローバル名前空間にも定義を導入したい場合、[`std.compat`](std.compat.md)を使用できる。
グローバル名前空間にも定義を導入したい場合、`std`の代わりに[`std.compat`](std.compat.md)を使用できる(両方を使う必要はない)。

## この機能が必要になった背景・経緯

C++20に言語機能としての[モジュール](/lang/cpp20/modules.md)を追加する議論と並行して、標準ライブラリをモジュールへ再編する議論も行われていた。
例えば、[P0581R1](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0581r1.pdf)では以下のモジュールが提案されている。

- `std.fundamental`
- `std.core`
- `std.io`
- `std.os`
- `std.concurrency`
- `std.math`
- `std`

しかし、標準ライブラリ全体の再編はあまりにも壮大であり、C++20には間に合わなかった。
これではモジュールの恩恵を受けるのが難しいということで、最小限のモジュールとして`std`がC++23に間に合うように追加された。

## バージョン
### 言語
Expand Down

0 comments on commit afd10bb

Please sign in to comment.