Skip to content

Commit 5b4c4f3

Browse files
authored
Merge pull request gabime#2011 from sjanel/bugfix/fixclangcompilation
Fix compilation error in clang 13 in C++20 mode - ambiguous call to log function
2 parents 816ede3 + aecdfc6 commit 5b4c4f3

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Diff for: include/spdlog/logger.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,13 @@ class SPDLOG_API logger
102102
log(loc, lvl, string_view_t{msg});
103103
}
104104

105-
// T cannot be statically converted to niether string_view, neither wstring_view and niether to format string
106-
template<class T, typename std::enable_if<!std::is_convertible<const T &, spdlog::string_view_t>::value
107-
&& !is_convertible_to_basic_format_string<const T&>::value,
108-
int>::type = 0>
105+
// T cannot be statically converted to neither string_view, nor wstring_view and nor format string
106+
template<class T, typename std::enable_if<!std::is_convertible<const T &, spdlog::string_view_t>::value &&
107+
!is_convertible_to_basic_format_string<const T &>::value,
108+
int>::type = 0>
109109
void log(source_loc loc, level::level_enum lvl, const T &msg)
110110
{
111-
log(loc, lvl, "{}", msg);
111+
log(loc, lvl, "{}", msg);
112112
}
113113

114114
void log(log_clock::time_point log_time, source_loc loc, level::level_enum lvl, string_view_t msg)
@@ -141,7 +141,7 @@ class SPDLOG_API logger
141141
{
142142
log(source_loc{}, lvl, msg);
143143
}
144-
144+
145145
template<typename... Args>
146146
void trace(fmt::format_string<Args...> fmt, Args &&...args)
147147
{

0 commit comments

Comments
 (0)