mirror of
https://github.com/fmtlib/fmt.git
synced 2025-11-28 21:30:00 +01:00
Make format_to a non-member
This commit is contained in:
@@ -3368,11 +3368,10 @@ inline OutputIt vformat_to(OutputIt out, const S& format_str,
|
||||
fmt::format_to(std::back_inserter(out), "{}", 42);
|
||||
\endrst
|
||||
*/
|
||||
template <typename OutputIt, typename S, typename... Args>
|
||||
template <typename OutputIt, typename S, typename... Args,
|
||||
FMT_ENABLE_IF(internal::is_output_iterator<OutputIt>::value&&
|
||||
internal::is_string<S>::value)>
|
||||
inline OutputIt format_to(OutputIt out, const S& format_str, Args&&... args) {
|
||||
static_assert(internal::is_output_iterator<OutputIt>::value &&
|
||||
internal::is_string<S>::value,
|
||||
"");
|
||||
internal::check_format_string<Args...>(format_str);
|
||||
using context = format_context_t<OutputIt, char_t<S>>;
|
||||
return vformat_to(out, to_string_view(format_str),
|
||||
|
||||
Reference in New Issue
Block a user