mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-27 03:21:34 +00:00
Move contiguous version of format_to to fmt/core.h
This commit is contained in:
parent
8db14efa84
commit
c684349195
@ -1336,6 +1336,23 @@ typename std::enable_if<
|
|||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename Container, typename... Args>
|
||||||
|
inline typename std::enable_if<
|
||||||
|
is_contiguous<Container>::value, std::back_insert_iterator<Container>>::type
|
||||||
|
format_to(std::back_insert_iterator<Container> out,
|
||||||
|
string_view format_str, const Args & ... args) {
|
||||||
|
return vformat_to(out, format_str, make_format_args<format_context>(args...));
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename Container, typename... Args>
|
||||||
|
inline typename std::enable_if<
|
||||||
|
is_contiguous<Container>::value, std::back_insert_iterator<Container>>::type
|
||||||
|
format_to(std::back_insert_iterator<Container> out,
|
||||||
|
wstring_view format_str, const Args & ... args) {
|
||||||
|
return vformat_to(out, format_str,
|
||||||
|
make_format_args<wformat_context>(args...));
|
||||||
|
}
|
||||||
|
|
||||||
std::string vformat(string_view format_str, format_args args);
|
std::string vformat(string_view format_str, format_args args);
|
||||||
std::wstring vformat(wstring_view format_str, wformat_args args);
|
std::wstring vformat(wstring_view format_str, wformat_args args);
|
||||||
|
|
||||||
|
@ -3579,23 +3579,6 @@ inline OutputIt format_to(OutputIt out, string_view format_str,
|
|||||||
make_format_args<typename format_context_t<OutputIt>::type>(args...));
|
make_format_args<typename format_context_t<OutputIt>::type>(args...));
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename Container, typename... Args>
|
|
||||||
inline typename std::enable_if<
|
|
||||||
is_contiguous<Container>::value, std::back_insert_iterator<Container>>::type
|
|
||||||
format_to(std::back_insert_iterator<Container> out,
|
|
||||||
string_view format_str, const Args & ... args) {
|
|
||||||
return vformat_to(out, format_str, make_format_args<format_context>(args...));
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename Container, typename... Args>
|
|
||||||
inline typename std::enable_if<
|
|
||||||
is_contiguous<Container>::value, std::back_insert_iterator<Container>>::type
|
|
||||||
format_to(std::back_insert_iterator<Container> out,
|
|
||||||
wstring_view format_str, const Args & ... args) {
|
|
||||||
return vformat_to(out, format_str,
|
|
||||||
make_format_args<wformat_context>(args...));
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename OutputIt>
|
template <typename OutputIt>
|
||||||
struct format_to_n_result {
|
struct format_to_n_result {
|
||||||
/** Iterator past the end of the output range. */
|
/** Iterator past the end of the output range. */
|
||||||
|
Loading…
Reference in New Issue
Block a user