Merge pull request #2011 from sjanel/bugfix/fixclangcompilation

Fix compilation error in clang 13 in C++20 mode - ambiguous call to log function
This commit is contained in:
Gabi Melman 2021-07-27 12:26:34 +03:00 committed by GitHub
commit 5b4c4f3f77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -102,9 +102,9 @@ public:
log(loc, lvl, string_view_t{msg}); log(loc, lvl, string_view_t{msg});
} }
// T cannot be statically converted to niether string_view, neither wstring_view and niether to format string // T cannot be statically converted to neither string_view, nor wstring_view and nor format string
template<class T, typename std::enable_if<!std::is_convertible<const T &, spdlog::string_view_t>::value template<class T, typename std::enable_if<!std::is_convertible<const T &, spdlog::string_view_t>::value &&
&& !is_convertible_to_basic_format_string<const T&>::value, !is_convertible_to_basic_format_string<const T &>::value,
int>::type = 0> int>::type = 0>
void log(source_loc loc, level::level_enum lvl, const T &msg) void log(source_loc loc, level::level_enum lvl, const T &msg)
{ {