diff --git a/include/fmt/core.h b/include/fmt/core.h index 11a887f4..88798142 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -753,7 +753,7 @@ class basic_format_arg { template friend FMT_CONSTEXPR typename internal::result_of::type - visit(Visitor &&vis, const basic_format_arg &arg); + visit_format_arg(Visitor &&vis, const basic_format_arg &arg); friend class basic_format_args; friend class internal::arg_map; @@ -794,7 +794,7 @@ struct monostate {}; */ template FMT_CONSTEXPR typename internal::result_of::type - visit(Visitor &&vis, const basic_format_arg &arg) { + visit_format_arg(Visitor &&vis, const basic_format_arg &arg) { typedef typename Context::char_type char_type; switch (arg.type_) { case internal::none_type: @@ -831,6 +831,12 @@ FMT_CONSTEXPR typename internal::result_of::type return vis(monostate()); } +template +FMT_CONSTEXPR typename internal::result_of::type + visit(Visitor &&vis, const basic_format_arg &arg) { + return visit_format_arg(std::forward(vis), arg); +} + // Parsing context consisting of a format string range being parsed and an // argument counter for automatic indexing. template diff --git a/include/fmt/format.h b/include/fmt/format.h index 0b774d33..7c3d5719 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -1818,7 +1818,8 @@ template