diff --git a/reference/format/basic_format_context.md b/reference/format/basic_format_context.md index 00c619c43f..17cf7666aa 100644 --- a/reference/format/basic_format_context.md +++ b/reference/format/basic_format_context.md @@ -19,28 +19,28 @@ namespace std { ## 概要 実際に渡されたフォーマット引数を含む、フォーマット実行中の状態を保持するクラス。 -* (1): テンプレートの定義 -* (2): マルチバイト文字列版の特殊化 (出力イテレータの型は未規定) -* (3): ワイド文字列版の特殊化 (出力イテレータの型は未規定) +- (1): テンプレートの定義 +- (2): マルチバイト文字列版の別名 (出力イテレータの型は未規定) +- (3): ワイド文字列版の別名 (出力イテレータの型は未規定) ## テンプレートパラメータ制約 +- `Out`は`OutputIterator`であること -`Out`は`OutputIterator`であること。 ## メンバ関数 -| 名前 | 説明 | 対応バージョン | -|--------------------------------------|--------------------------------------------------|----------------| -| [`arg`](basic_format_context/arg.md) | フォーマット引数を得る | C++20 | -| `out` | 出力イテレータを得る | C++20 | -| `advance_to` | 出力イテレータを指定したイテレータに設定する | C++20 | -| `locale` | ロケールを得る | C++20 | +| 名前 | 説明 | 対応バージョン | +|--------------------------------------|----------------------------------------------|----------------| +| [`arg`](basic_format_context/arg.md) | フォーマット引数を取得する | C++20 | +| [`out`](basic_format_context/out.md) | 出力イテレータを取得する | C++20 | +| [`advance_to`](basic_format_context/advance_to.md) | 出力イテレータを指定したイテレータに設定する | C++20 | +| [`locale`](basic_format_context/locale.md) | ロケールを取得する | C++20 | ## メンバ型 | 名前 | 説明 | 対応バージョン | |------------------|----------------------------------------------------|----------------| -| `iterator` | 出力イテレータ(`Out`と等しい) (type-alias) | C++20 | +| `iterator` | 出力イテレータ(`Out`と等しい) (type-alias) | C++20 | | `char_type` | 文字の型(`charT`と等しい) (type-alias) | C++20 | | `formatter_type` | 型`T`に対応するフォーマッターの型 (alias-template) | C++20 | diff --git a/reference/format/basic_format_context/advance_to.md b/reference/format/basic_format_context/advance_to.md new file mode 100644 index 0000000000..5aff44b4a7 --- /dev/null +++ b/reference/format/basic_format_context/advance_to.md @@ -0,0 +1,40 @@ +# advance_to +* format[meta header] +* function[meta id-type] +* std[meta namespace] +* basic_format_context[meta class] +* cpp20[meta cpp] + +```cpp +void advance_to(iterator it); +``` +* basic_format_arg[link /reference/format/basic_format_arg.md] +* basic_format_context[link /reference/format/basic_format_context.md] + +## 概要 +出力イテレータを指定したイテレータに設定する。 + + +## 効果 +以下と等価: + +```cpp +out_ = std::move(it); +``` +* std::move[link /reference/utility/move.md] + +ここで`out_`は、メンバ変数として保持している出力イテレータである。 + + +## バージョン +### 言語 +- C++20 + +### 処理系 +- [Clang](/implementation.md#clang): ?? +- [GCC](/implementation.md#gcc): 13 +- [Visual C++](/implementation.md#visual_cpp): ?? + +## 参照 + +- [P0645R10 Text Formatting](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p0645r10.html) diff --git a/reference/format/basic_format_context/arg.md b/reference/format/basic_format_context/arg.md index 067b2d4d9e..5787680bb6 100644 --- a/reference/format/basic_format_context/arg.md +++ b/reference/format/basic_format_context/arg.md @@ -1,5 +1,4 @@ # arg - * format[meta header] * function[meta id-type] * std[meta namespace] @@ -7,14 +6,14 @@ * cpp20[meta cpp] ```cpp -basic_format_arg arg(size_t id) const +basic_format_arg arg(size_t id) const; ``` * basic_format_arg[link /reference/format/basic_format_arg.md] * basic_format_context[link /reference/format/basic_format_context.md] ## 概要 -`i`番目のフォーマット引数を得る。`i`が範囲外の場合、`basic_format_arg`のデフォルト値を返す。 +`i`番目のフォーマット引数を取得する。`i`が範囲外の場合、`basic_format_arg`のデフォルト値を返す。 ## バージョン ### 言語 @@ -22,10 +21,10 @@ basic_format_arg arg(size_t id) const ### 処理系 - [Clang](/implementation.md#clang): ?? -- [GCC](/implementation.md#gcc): ?? +- [GCC](/implementation.md#gcc): 13 - [ICC](/implementation.md#icc): ?? - [Visual C++](/implementation.md#visual_cpp): ?? ## 参照 -* [P0645R10 Text Formatting](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p0645r10.html) +- [P0645R10 Text Formatting](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p0645r10.html) diff --git a/reference/format/basic_format_context/locale.md b/reference/format/basic_format_context/locale.md new file mode 100644 index 0000000000..5990d19ea6 --- /dev/null +++ b/reference/format/basic_format_context/locale.md @@ -0,0 +1,32 @@ +# locale +* format[meta header] +* function[meta id-type] +* std[meta namespace] +* basic_format_context[meta class] +* cpp20[meta cpp] + +```cpp +std::locale locale(); +``` +* std::locale[link /reference/locale/locale.md] + +## 概要 +ロケールを取得する。 + + +## 効果 +文字列フォーマット関数に指定されたロケールオブジェクトがあればそれを返し、そうでなければ[`std::locale()`](/reference/locale/locale.md)を返す。 + + +## バージョン +### 言語 +- C++20 + +### 処理系 +- [Clang](/implementation.md#clang): ?? +- [GCC](/implementation.md#gcc): 13 +- [Visual C++](/implementation.md#visual_cpp): ?? + +## 参照 + +- [P0645R10 Text Formatting](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p0645r10.html) diff --git a/reference/format/basic_format_context/out.md b/reference/format/basic_format_context/out.md new file mode 100644 index 0000000000..4c8569f053 --- /dev/null +++ b/reference/format/basic_format_context/out.md @@ -0,0 +1,40 @@ +# out +* format[meta header] +* function[meta id-type] +* std[meta namespace] +* basic_format_context[meta class] +* cpp20[meta cpp] + +```cpp +iterator out(); +``` +* basic_format_arg[link /reference/format/basic_format_arg.md] +* basic_format_context[link /reference/format/basic_format_context.md] + +## 概要 +出力イテレータを取得する。 + + +## 効果 +以下と等価: + +```cpp +return std::move(out_); +``` +* std::move[link /reference/utility/move.md] + +ここで`out_`は、メンバ変数として保持している出力イテレータである。 + + +## バージョン +### 言語 +- C++20 + +### 処理系 +- [Clang](/implementation.md#clang): ?? +- [GCC](/implementation.md#gcc): 13 +- [Visual C++](/implementation.md#visual_cpp): ?? + +## 参照 + +- [P0645R10 Text Formatting](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p0645r10.html)