You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I cannot seem to compile any code that includes spdlog with clang 12.0.1.
#include <spdlog/spdlog.h>
int
main(int /*argc*/, char** /*argv*/)
{
spdlog::info("Welcome to spdlog!");
return 0;
}
/usr/bin/clang++ -std=c++20 -stdlib=libc++ -ggdb3 -pedantic-errors -Wall -Werror -Wextra -O0 -DSPDLOG_COMPILED_LIB -isystem/tmp/spdlog/1.9.1/include -c main.cpp
-o main.o
In file included from main.cpp:1:
In file included from /tmp/spdlog/1.9.1/include/spdlog/spdlog.h:12:
In file included from /tmp/spdlog/1.9.1/include/spdlog/common.h:7:
In file included from /tmp/spdlog/1.9.1/include/spdlog/details/null_mutex.h:6:
In file included from /usr/bin/../include/c++/v1/atomic:579:
In file included from /usr/bin/../include/c++/v1/__threading_support:15:
In file included from /usr/bin/../include/c++/v1/chrono:829:
/usr/bin/../include/c++/v1/type_traits:1688:66: error: call to consteval function 'fmt::basic_format_string<char>::basic_format_string<fmt::basic_string_view<char>, 0>' is no
t a constant expression
: public integral_constant<bool, __is_convertible_to(_T1, _T2)> {};
^
/tmp/spdlog/1.9.1/include/spdlog/common.h:141:41: note: in instantiation of template class 'std::is_convertible<const fmt::basic_string_view<char> &, fmt::basic_format_string
<char>>' requested here
: std::integral_constant<bool, std::is_convertible<const T &, fmt::format_string<>>::value || is_convertible_to_wformat_string<T>::value>
^
/tmp/spdlog/1.9.1/include/spdlog/logger.h:107:52: note: in instantiation of template class 'spdlog::is_convertible_to_basic_format_string<const fmt::basic_string_view<char> &
>' requested here
!is_convertible_to_basic_format_string<const T &>::value,
^
/tmp/spdlog/1.9.1/include/spdlog/logger.h:109:10: note: while substituting prior template arguments into non-type template parameter [with T = fmt::basic_string_view<char>]
void log(source_loc loc, level::level_enum lvl, const T &msg)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/spdlog/1.9.1/include/spdlog/logger.h:102:9: note: while substituting deduced template arguments into function template 'log' [with T = fmt::basic_string_view<char>, $1 =
(no value)]
log(loc, lvl, string_view_t{msg});
^
/usr/bin/../include/c++/v1/type_traits:1688:66: note: undefined constructor 'basic_format_string<fmt::basic_string_view<char>, 0>' cannot be used in a constant expression
: public integral_constant<bool, __is_convertible_to(_T1, _T2)> {};
^
/tmp/spdlog/1.9.1/include/spdlog/fmt/bundled/core.h:2835:17: note: declared here
FMT_CONSTEVAL basic_format_string(const S& s) : str_(s) {
In file included from main.cpp:1:
In file included from /tmp/spdlog/1.9.1/include/spdlog/spdlog.h:12:
In file included from /tmp/spdlog/1.9.1/include/spdlog/common.h:7:
In file included from /tmp/spdlog/1.9.1/include/spdlog/details/null_mutex.h:6:
In file included from /usr/bin/../include/c++/v1/atomic:579:
In file included from /usr/bin/../include/c++/v1/__threading_support:15:
In file included from /usr/bin/../include/c++/v1/chrono:829:
/usr/bin/../include/c++/v1/type_traits:1688:66: error: call to consteval function 'fmt::basic_format_string<char>::basic_format_string<char [19], 0>' is not a constant expression
: public integral_constant<bool, __is_convertible_to(_T1, _T2)> {};
^
/tmp/spdlog/1.9.1/include/spdlog/common.h:141:41: note: in instantiation of template class 'std::is_convertible<char const (&)[19], fmt::basic_format_string<char>>' requested here
: std::integral_constant<bool, std::is_convertible<const T &, fmt::format_string<>>::value || is_convertible_to_wformat_string<T>::value>
^
/tmp/spdlog/1.9.1/include/spdlog/logger.h:107:52: note: in instantiation of template class 'spdlog::is_convertible_to_basic_format_string<char const (&)[19]>' requested here
!is_convertible_to_basic_format_string<const T &>::value,
^
/tmp/spdlog/1.9.1/include/spdlog/logger.h:109:10: note: while substituting prior template arguments into non-type template parameter [with T = char [19]]
void log(source_loc loc, level::level_enum lvl, const T &msg)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/spdlog/1.9.1/include/spdlog/logger.h:95:9: note: while substituting deduced template arguments into function template 'log' [with T = char [19], $1 = (no value)]
log(source_loc{}, lvl, msg);
^
/tmp/spdlog/1.9.1/include/spdlog/logger.h:246:9: note: in instantiation of function template specialization 'spdlog::logger::log<char [19]>' requested here
log(level::info, msg);
^
/tmp/spdlog/1.9.1/include/spdlog/spdlog.h:255:27: note: in instantiation of function template specialization 'spdlog::logger::info<char [19]>' requested here
default_logger_raw()->info(msg);
^
main.cpp:7:13: note: in instantiation of function template specialization 'spdlog::info<char [19]>' requested here
spdlog::info("Welcome to spdlog!");
^
/usr/bin/../include/c++/v1/type_traits:1688:66: note: undefined constructor 'basic_format_string<char [19], 0>' cannot be used in a constant expression
: public integral_constant<bool, __is_convertible_to(_T1, _T2)> {};
^
/tmp/spdlog/1.9.1/include/spdlog/fmt/bundled/core.h:2835:17: note: declared here
FMT_CONSTEVAL basic_format_string(const S& s) : str_(s) {
^
2 errors generated.
spdlog was built using the following cmake command
I cannot seem to compile any code that includes spdlog with clang 12.0.1.
spdlog was built using the following cmake command
Any help would be appreciated. Thanks!
The text was updated successfully, but these errors were encountered: