diff --git a/include/spdlog/common.h b/include/spdlog/common.h index bc4334397..9d4b29d2a 100644 --- a/include/spdlog/common.h +++ b/include/spdlog/common.h @@ -121,27 +121,23 @@ using string_view_t = std::string_view; using memory_buf_t = std::string; using wstring_view_t = std::wstring_view; using wmemory_buf_t = std::wstring; - template # if __cpp_lib_format >= 202207L using format_string_t = std::format_string; # else using format_string_t = std::string_view; # endif - # define SPDLOG_BUF_TO_STRING(x) x #else // use fmt lib instead of std::format namespace fmt_lib = fmt; - using string_view_t = fmt::basic_string_view; using memory_buf_t = fmt::basic_memory_buffer; -template -using format_string_t = fmt::format_string; using wstring_view_t = fmt::basic_string_view; using wmemory_buf_t = fmt::basic_memory_buffer; +template +using format_string_t = fmt::format_string; # define SPDLOG_BUF_TO_STRING(x) fmt::to_string(x) -#endif // SPDLOG_USE_STD_FORMAT - +#endif // SPDLOG_USE_STD_FORMAT #define SPDLOG_LEVEL_TRACE 0 #define SPDLOG_LEVEL_DEBUG 1