diff --git a/include/spdlog/common.h b/include/spdlog/common.h index 9a425464..ed0ab46c 100644 --- a/include/spdlog/common.h +++ b/include/spdlog/common.h @@ -130,30 +130,12 @@ struct is_convertible_to_basic_format_string #ifdef SPDLOG_WCHAR_TO_UTF8_SUPPORT # ifndef _WIN32 # error SPDLOG_WCHAR_TO_UTF8_SUPPORT only supported on windows -# else -template -struct is_convertible_to_wstring_view : std::is_convertible -{}; - -template -using is_convertible_to_wformat_string = is_convertible_to_basic_format_string; # endif // _WIN32 -#else -template -struct is_convertible_to_wstring_view : std::false_type -{}; -template -struct is_convertible_to_wformat_string : std::false_type -{}; -#endif // SPDLOG_WCHAR_TO_UTF8_SUPPORT +#endif // SPDLOG_WCHAR_TO_UTF8_SUPPORT template -struct is_convertible_to_any_string_view - : std::integral_constant::value || is_convertible_to_wstring_view::value> -{}; -template -struct is_convertible_to_any_format_string - : std::integral_constant::value || is_convertible_to_wformat_string::value> +struct is_convertible_to_any_format_string : std::integral_constant::value || + is_convertible_to_basic_format_string::value> {}; #if defined(SPDLOG_NO_ATOMIC_LEVELS) diff --git a/include/spdlog/logger.h b/include/spdlog/logger.h index 1d23c5a6..ff3bef58 100644 --- a/include/spdlog/logger.h +++ b/include/spdlog/logger.h @@ -102,10 +102,8 @@ public: log(loc, lvl, string_view_t{msg}); } - // T cannot be statically converted to neither string_view, nor wstring_view and nor format string - template::value && !is_convertible_to_any_format_string::value, int>::type = 0> + // T cannot be statically converted to format string (including string_view) + template::value, int>::type = 0> void log(source_loc loc, level::level_enum lvl, const T &msg) { log(loc, lvl, "{}", msg);