More compile-time checks

This commit is contained in:
Victor Zverovich 2022-07-04 08:25:27 -07:00
parent 1010b7f148
commit 55727e3b21

View File

@ -82,6 +82,16 @@ auto vformat(basic_string_view<Char> format_str,
return to_string(buffer);
}
#if !FMT_GCC_VERSION || FMT_GCC_VERSION >= 409
template <typename... Args>
using wformat_string = basic_format_string<wchar_t, type_identity_t<Args>...>;
#endif
template <typename... T>
auto format(wformat_string<T...> fmt, T&&... args) -> std::wstring {
return vformat(fmt, fmt::make_wformat_args(args...));
}
// Pass char_t as a default template parameter instead of using
// std::basic_string<char_t<S>> to reduce the symbol size.
template <typename S, typename... Args, typename Char = char_t<S>,