In file included from /usr/local/include/spdlog/fmt/fmt.h:25: /usr/local/include/fmt/core.h:1727:3: error: static_assert failed due to requirement 'formattable' "Cannot format an argument. To make type T formattable provide a formatter<T> specialization: https://fmt.dev/latest/api.html...
您正在将一个类型传递给一个spdlog函数,而spdlog不知道如何格式化它。
template <typename T, typename ...Args> requires (Formattable<Args> && ...) static std::string getFormattedString(T message, Args ...args) { std::string formattedString; try { formattedString = fmt::format(message, args...); formattedString = std::vformat(message, std::make_format_...
指针指向一个对象,但是成员指针指向的是类的成员,而不是类的所创建出的对象 类的静态成员不属于任何...
#include "spdlog/pattern_formatter.h" class my_formatter_flag : public spdlog::custom_flag_formatter { public: void format(const spdlog::details::log_msg &, const std::tm &, spdlog::memory_buf_t &dest) override { std::string some_txt = "custom-flag"; dest.append(some_txt.data(),...
But getting back to the marco above, perhaps you could consider offering that in an example, or footnote to the formatting table for %s and %#.USAFrenzy commented Apr 15, 2022 • edited I'm very much still in the process of learning and have started writing my own version of a logg...
Severity Code Description Project File Line Suppression State Error C2338 Cannot format argument. To make type T formattable provide a formatter<T> specialization: https://fmt.dev/latest/api.html#formatting-user-defined-types mt4 C:\Users\andre\source\repos\HolyGrail2\mt4\fmt_x86-windows\include...