diff --git a/include/format.hpp b/include/format.hpp index d8c74cf..2780cb4 100644 --- a/include/format.hpp +++ b/include/format.hpp @@ -10,7 +10,15 @@ namespace util { template inline constexpr auto format(std::string_view fmt, Ts&&... args) -> std::string { -return std::vformat(fmt, std::make_format_args(std::forward(args)...)); +#if defined(__cpp_if_consteval) && defined(doesnt_work_yet_in_clang_14) + if + consteval { return std::format(fmt, args...); } + else { + return std::vformat(fmt, std::make_format_args(std::forward(args)...)); + } +#else + return std::vformat(fmt, std::make_format_args(std::forward(args)...)); +#endif } template