Commit 55727e3b authored by Victor Zverovich's avatar Victor Zverovich

More compile-time checks

parent 1010b7f1
...@@ -82,6 +82,16 @@ auto vformat(basic_string_view<Char> format_str, ...@@ -82,6 +82,16 @@ auto vformat(basic_string_view<Char> format_str,
return to_string(buffer); 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 // Pass char_t as a default template parameter instead of using
// std::basic_string<char_t<S>> to reduce the symbol size. // std::basic_string<char_t<S>> to reduce the symbol size.
template <typename S, typename... Args, typename Char = char_t<S>, template <typename S, typename... Args, typename Char = char_t<S>,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment