gabime / spdlog

Fast C++ logging library.
Other
23.1k stars 4.38k forks source link

V1.14 don't support Win32xx.CString on vs2017 #3094

Open soncfe opened 1 month ago

soncfe commented 1 month ago

CString abc = "123"; spdlog::default_logger_raw()->info("{}", abc);

Before V1.13/12/11..., spdlog can support the Win32xx CString Class, Now on V1.14 or 1.14.1, compile report static_assert( formattable, "Cannot format an argument. To make type T formattable provide a " "formatter specialization: https://fmt.dev/latest/api.html#udt"); return {arg_mapper().map(val)};

https://github.com/DavidNash2024/Win32xx

tt4g commented 1 month ago

The latest version of spdlog is 1.14.1, not v14.

I don't know which version you are using, but the compile error message explains it all. You have not defined fmt::formatter<CString>, which is the cause of the compile error. See: https://github.com/gabime/spdlog/issues/2825#issuecomment-1645647907