Make formatted_size part of the core API

This commit is contained in:
Victor Zverovich
2020-07-23 07:34:35 -07:00
parent 46a63b7087
commit 47f8d7a345
3 changed files with 34 additions and 16 deletions

View File

@@ -3586,15 +3586,6 @@ std::basic_string<Char> detail::vformat(
return to_string(buffer);
}
/**
Returns the number of characters in the output of
``format(format_str, args...)``.
*/
template <typename... Args>
inline size_t formatted_size(string_view format_str, const Args&... args) {
return format_to(detail::counting_iterator(), format_str, args...).count();
}
template <typename Char, FMT_ENABLE_IF(std::is_same<Char, wchar_t>::value)>
void vprint(std::FILE* f, basic_string_view<Char> format_str,
wformat_args args) {