Skip to content

Commit

Permalink
ios_base::openmode : C++23対応としてnoreplaceフラグを追加 (close #1094)
Browse files Browse the repository at this point in the history
  • Loading branch information
faithandbrave committed Nov 11, 2023
1 parent 2c21229 commit e30c3ae
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions reference/ios/ios_base/type-openmode.md
Expand Up @@ -15,14 +15,15 @@ using openmode = T3;
`openmode` はストリームのオープンモードを指定するためのビットマスク型である。
`openmode` には以下の表のようなビットマスク値が存在し、全て [`ios_base`](../ios_base.md) の静的メンバ定数として定義されている。

| 定数 | 設定された場合の効果 |
|------|----------------------|
| `app` | 各書き込み(出力)の前に、ストリームの最後にシークする。(append の略) |
| `ate` | ストリームのオープン直後に、ストリームの最後にシークする。(at end の略) |
| `binary` | 入出力をバイナリで行う。(テキストモードの反対) |
| `in` | 入力のためにオープンする。 |
| `out` | 出力のためにオープンする。 |
| `trunc` | 既存のストリームをオープンする際に、ストリームの内容を切り詰める。(truncate の略) |
| 定数 | 設定された場合の効果 | 対応バージョン |
|------|----------------------|----------------|
| `app` | 各書き込み(出力)の前に、ストリームの最後にシークする(append の略) | |
| `ate` | ストリームのオープン直後に、ストリームの最後にシークする(at end の略) | |
| `binary` | 入出力をバイナリで行う(テキストモードの反対) | |
| `in` | 入力のためにオープンする | |
| `out` | 出力のためにオープンする | |
| `noreplace` | 出力のために新規作成でオープンする。ファイルが存在している場合はエラー | C++23 |
| `trunc` | 既存のストリームをオープンする際に、ストリームの内容を切り詰める(truncate の略) | |


##
Expand Down Expand Up @@ -136,3 +137,8 @@ test1TE2ST3
- [GCC](/implementation.md#gcc): 4.3.6, 4.4.7, 4.5.4, 4.6.4, 4.7.3, 4.8.1, 4.8.2, 4.9.0, 4.9.1, 4.9.2, 5.1.0, 5.2.0, 6.0.0
- [ICC](/implementation.md#icc): ??
- [Visual C++](/implementation.md#visual_cpp): ??


## 参照
- [P2467R1 Support exclusive mode for fstreams](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2467r1.html)
- C++23での`noreplace`の追加

0 comments on commit e30c3ae

Please sign in to comment.