Codechange: Add format_append as short-hand to format_to + back_inserter.
This commit is contained in:
@@ -45,4 +45,10 @@ struct fmt::formatter<T, Char> : fmt::formatter<typename T::BaseType> {
|
||||
}
|
||||
};
|
||||
|
||||
template <class... Args>
|
||||
void format_append(std::string &out, fmt::format_string<Args...> &&fmt, Args&&... args)
|
||||
{
|
||||
fmt::format_to(std::back_inserter(out), std::forward<decltype(fmt)>(fmt), std::forward<decltype(args)>(args)...);
|
||||
}
|
||||
|
||||
#endif /* FORMAT_HPP */
|
||||
|
||||
Reference in New Issue
Block a user