File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -267,24 +267,24 @@ void multi_sink_example() {
267267
268268// User defined types logging
269269struct my_type {
270- int i = 0 ;
271- explicit my_type (int i )
272- : i(i ) {}
270+ int value_ = 0 ;
271+ explicit my_type (int value )
272+ : value_(value ) {}
273273};
274274
275275#ifndef SPDLOG_USE_STD_FORMAT // when using fmtlib
276276template <>
277277struct fmt ::formatter<my_type> : fmt::formatter<std::string> {
278278 auto format (my_type my, format_context &ctx) const -> decltype(ctx.out()) {
279- return fmt::format_to (ctx.out (), " [my_type i ={}]" , my.i );
279+ return fmt::format_to (ctx.out (), " [my_type value ={}]" , my.value_ );
280280 }
281281};
282282
283283#else // when using std::format
284284template <>
285285struct std ::formatter<my_type> : std::formatter<std::string> {
286286 auto format (my_type my, format_context &ctx) const -> decltype(ctx.out()) {
287- return std::format_to (ctx.out (), " [my_type i ={}]" , my.i );
287+ return std::format_to (ctx.out (), " [my_type value ={}]" , my.value_ );
288288 }
289289};
290290#endif
You can’t perform that action at this time.
0 commit comments