visit -> visit_format_arg

This commit is contained in:
Victor Zverovich
2018-10-05 07:15:41 -07:00
parent cdf3fa08dc
commit f5480635c0
3 changed files with 26 additions and 16 deletions

View File

@@ -753,7 +753,7 @@ class basic_format_arg {
template <typename Visitor, typename Ctx>
friend FMT_CONSTEXPR typename internal::result_of<Visitor(int)>::type
visit(Visitor &&vis, const basic_format_arg<Ctx> &arg);
visit_format_arg(Visitor &&vis, const basic_format_arg<Ctx> &arg);
friend class basic_format_args<Context>;
friend class internal::arg_map<Context>;
@@ -794,7 +794,7 @@ struct monostate {};
*/
template <typename Visitor, typename Context>
FMT_CONSTEXPR typename internal::result_of<Visitor(int)>::type
visit(Visitor &&vis, const basic_format_arg<Context> &arg) {
visit_format_arg(Visitor &&vis, const basic_format_arg<Context> &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<Visitor(int)>::type
return vis(monostate());
}
template <typename Visitor, typename Context>
FMT_CONSTEXPR typename internal::result_of<Visitor(int)>::type
visit(Visitor &&vis, const basic_format_arg<Context> &arg) {
return visit_format_arg(std::forward<Visitor>(vis), arg);
}
// Parsing context consisting of a format string range being parsed and an
// argument counter for automatic indexing.
template <typename Char, typename ErrorHandler = internal::error_handler>