Move generic format functions to format.h
This commit is contained in:
+5
-6
@@ -432,13 +432,12 @@ class ostream final : private detail::buffer<char> {
|
||||
}
|
||||
|
||||
/**
|
||||
Formats ``args`` according to specifications in ``format_str`` and writes
|
||||
the output to the file.
|
||||
Formats ``args`` according to specifications in ``fmt`` and writes the
|
||||
output to the file.
|
||||
*/
|
||||
template <typename S, typename... Args>
|
||||
void print(const S& format_str, Args&&... args) {
|
||||
format_to(detail::buffer_appender<char>(*this), format_str,
|
||||
std::forward<Args>(args)...);
|
||||
template <typename... T> void print(format_string<T...> fmt, T&&... args) {
|
||||
vformat_to(detail::buffer_appender<char>(*this), fmt,
|
||||
make_format_args(args...));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user