std::vformat_to
ヘッダ <format> で定義 | ||
template<class OutputIt> OutputIt vformat_to(OutputIt out, | (1) | (C++20以上) |
template<class OutputIt, class... Args> OutputIt vformat_to(OutputIt out, | (2) | (C++20以上) |
template<class OutputIt, class... Args> OutputIt vformat_to(OutputIt out, conststd::locale& loc, | (3) | (C++20以上) |
template<class OutputIt, class... Args> OutputIt vformat_to(OutputIt out, conststd::locale& loc, | (4) | (C++20以上) |
書式文字列 fmt
に従って args
によって保持されている引数を書式化し、その結果を出力イテレータ out
に出力します。 存在する場合はロケール固有の書式化のために loc
が使用されます。
CharT
を decltype(fmt)::char_type (オーバーロード (1,3) の場合は char
、オーバーロード (2,4) の場合は wchar_t
) とします。
これらのオーバーロードは、 OutputIt
がコンセプト std::output_iterator<const CharT&>
を満たす 場合にのみ、オーバーロード解決に参加します。 OutputIt
がコンセプト std::output_iterator<const CharT&>
をモデル化しない (意味論の要件を満たさない) 場合、または std::formatter<Ti, CharT> が引数の型 Ti
のいずれかについて Formatter の要件を満たさない場合、動作は未定義です。
目次 |
[編集]引数
out | - | 出力バッファを指すイテレータ。 |
fmt | - | 書式文字列を表す文字列ビュー。 書式文字列は以下から構成されます。
置換フィールドは以下の形式を持ちます。
arg-id は書式化に使用する値を持つ 書式指定は対応する引数のための std::formatter の特殊化によって定義されます。
|
args | - | 書式化する引数。 |
loc | - | ロケール固有の書式化のために使用される std::locale。 |
[編集]戻り値
出力範囲の終端を指すイテレータ。
[編集]例外
fmt
が有効な書式文字列でない場合 std::format_error を投げます。 いずれかのフォーマッタによって投げられる例外も伝播されます。
This section is incomplete Reason: the second sentence is not backed by the draft standard |
[編集]例
This section is incomplete Reason: no example |