format_to overloads
Synopses
Declared in <fmt/base.h>
Formats args according to specifications in fmt and writes the result to the output iterator out.
template<
typename OutputIt,
typename... T>
OutputIt
format_to(
OutputIt out,
wformat_string<T...> fmt,
T&&... args);
Formats args according to specifications in fmt and writes the result into the fixed‐size character array out, truncating if it does not fit.
template<
size_t N,
typename... T>
format_to_result
format_to(
char(& out)[],
format_string<T...> fmt,
T&&... args);
Formats args according to specifications in fmt, writes the result to the output iterator out and returns the iterator past the end of the output range. format_to does not append a terminating null character.
template<
typename OutputIt,
typename... T>
remove_cvref_t<OutputIt>
format_to(
OutputIt&& out,
format_string<T...> fmt,
T&&... args);
Formats args according to the pre‐compiled format string cf and writes the result to the output iterator out.
template<
typename OutputIt,
typename CompiledFormat,
typename... T>
constexpr
OutputIt
format_to(
OutputIt out,
CompiledFormat const& cf,
T const&... args);
Formats args according to the compiled format string fmt and writes the result to the output iterator out.
template<
typename OutputIt,
typename S,
typename... T>
constexpr
OutputIt
format_to(
OutputIt out,
S const& fmt,
T&&... args);
Formats args according to specifications in fmt, with an exotic (non‐`char`, non‐`wchar_t`) character type, and writes the result to the output iterator out.
template<
typename OutputIt,
typename S,
typename... T,
typename Char = /* implementation-defined */>
OutputIt
format_to(
OutputIt out,
S const& fmt,
T&&... args);
Formats args according to specifications in fmt, using the given locale, and writes the result to the output iterator out.
template<
typename OutputIt,
typename... T>
OutputIt
format_to(
OutputIt out,
locale_ref loc,
format_string<T...> fmt,
T&&... args);
Formats arguments with the given text style, writes the result to the output iterator out and returns the iterator past the end of the output range.
template<
typename OutputIt,
typename... T>
OutputIt
format_to(
OutputIt out,
text_style ts,
format_string<T...> fmt,
T&&... args);
Formats args according to specifications in fmt, using the given locale, with an exotic character type, and writes the result to the output iterator out.
template<
typename OutputIt,
typename S,
typename... T,
typename Char = /* implementation-defined */,
bool enable = detail::is_output_iterator<OutputIt, Char>::value && detail::is_exotic_char<Char>::value>
OutputIt
format_to(
OutputIt out,
locale_ref loc,
S const& fmt,
T&&... args)
requires enable;
Return Value
-
An iterator past the end of the output.
-
The pointer past the end of the write and whether it was truncated.
-
An iterator past the end of the output range.
-
An iterator past the end of the output written.
-
An iterator past the end of the written output.
Parameters
Name |
Description |
out |
The output iterator to write to. |
fmt |
The format string. |
args |
The arguments to format. |
cf |
The pre‐compiled format string. |
loc |
The locale to use for locale‐specific formatting. |
ts |
The text style to apply. |
Created with MrDocs