Fixed example for custom_type

This commit is contained in:
gabime 2021-12-04 14:44:31 +02:00
parent 2c21d9ecf8
commit b8b16e49a5

View File

@ -260,12 +260,13 @@ struct my_type
int i = 0; int i = 0;
}; };
namespace fmt_lib = spdlog::fmt_lib;
template<> template<>
struct spdlog::fmt_lib::formatter<my_type> : spdlog::fmt_lib::formatter<std::string> struct fmt_lib::formatter<my_type> : fmt_lib::formatter<std::string>
{ {
auto format(my_type my, format_context &ctx) auto format(my_type my, format_context &ctx)
{ {
return formatter<std::string>::format(spdlog::fmt_lib::format("[my_type i={}]", my.i), ctx); return formatter<std::string>::format(fmt_lib::format("[my_type i={}]", my.i), ctx);
} }
}; };