diff --git a/include/fmt/xchar.h b/include/fmt/xchar.h index ac0f1832..2865b76e 100644 --- a/include/fmt/xchar.h +++ b/include/fmt/xchar.h @@ -82,6 +82,16 @@ auto vformat(basic_string_view format_str, return to_string(buffer); } +#if !FMT_GCC_VERSION || FMT_GCC_VERSION >= 409 +template +using wformat_string = basic_format_string...>; +#endif + +template +auto format(wformat_string 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> to reduce the symbol size. template ,