diff --git a/include/spdlog/logger.h b/include/spdlog/logger.h index 81a018c0..60814e22 100644 --- a/include/spdlog/logger.h +++ b/include/spdlog/logger.h @@ -75,20 +75,12 @@ public: void swap(spdlog::logger &other) SPDLOG_NOEXCEPT; - // FormatString is a type derived from fmt::compile_string - template::value, int>::type = 0, typename... Args> + template void log(source_loc loc, level::level_enum lvl, const FormatString &fmt, Args &&...args) { log_(loc, lvl, fmt, std::forward(args)...); } - // FormatString is NOT a type derived from fmt::compile_string but is a string_view_t or can be implicitly converted to one - template - void log(source_loc loc, level::level_enum lvl, string_view_t fmt, Args &&...args) - { - log_(loc, lvl, fmt, std::forward(args)...); - } - template void log(level::level_enum lvl, const FormatString &fmt, Args &&...args) { @@ -137,9 +129,8 @@ public: log(source_loc{}, lvl, msg); } - // T can be statically converted to string_view and isn't a fmt::compile_string - template::value && !fmt::is_compile_string::value, int>::type = 0> + // T can be statically converted to string_view + template::value, int>::type = 0> void log(source_loc loc, level::level_enum lvl, const T &msg) { log(loc, lvl, string_view_t{msg});