From f5480635c052f7a399e6ff271ef291cde5631eb1 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Fri, 5 Oct 2018 07:15:41 -0700 Subject: [PATCH] visit -> visit_format_arg --- include/fmt/core.h | 10 ++++++++-- include/fmt/format.h | 17 ++++++++++------- include/fmt/printf.h | 15 ++++++++------- 3 files changed, 26 insertions(+), 16 deletions(-) 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