mirror of
https://github.com/fmtlib/fmt.git
synced 2025-11-30 14:19:30 +01:00
visit -> visit_format_arg
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user