From 55727e3b2146fa84cb351575b05d544b399743cd Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Mon, 4 Jul 2022 08:25:27 -0700 Subject: [PATCH] More compile-time checks --- include/fmt/xchar.h | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 ,