spdlog icon indicating copy to clipboard operation
spdlog copied to clipboard

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

Open soncfe opened this issue 1 year ago • 1 comments

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<T> specialization: https://fmt.dev/latest/api.html#udt"); return {arg_mapper<Context>().map(val)};

https://github.com/DavidNash2024/Win32xx

soncfe avatar May 24 '24 09:05 soncfe

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

tt4g avatar May 24 '24 12:05 tt4g