diff --git a/example/example.cpp b/example/example.cpp index 0d0db6b8..54212374 100644 --- a/example/example.cpp +++ b/example/example.cpp @@ -262,12 +262,11 @@ struct my_type namespace fmt_lib = spdlog::fmt_lib; template<> -struct fmt_lib::formatter : fmt_lib::formatter +struct fmt_lib::formatter : fmt_lib::formatter { - auto format(my_type my, format_context &ctx) - { - auto &&out = ctx.out(); - return fmt_lib::format_to(out, "[my_type i={}]", my.i); + auto format(my_type my, format_context &ctx) -> decltype(ctx.out()) + { + return fmt_lib::format_to(ctx.out(), "[my_type i={}]", my.i); } };