aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--paludis/util/visitor.hh15
1 files changed, 15 insertions, 0 deletions
diff --git a/paludis/util/visitor.hh b/paludis/util/visitor.hh
index c51429b4a..19b3d0b6b 100644
--- a/paludis/util/visitor.hh
+++ b/paludis/util/visitor.hh
@@ -182,6 +182,15 @@ namespace paludis
}
};
+ template <typename Case_, typename V_>
+ struct CallThisCase<void, Case_, V_, true>
+ {
+ static void call(const Case_ & thiscase, const FirstCallArgumentType<Case_> & v, const V_ & revisitor)
+ {
+ thiscase(v, accept_visitor(revisitor));
+ }
+ };
+
template <typename Revisitor_, typename Result_, typename Case_, typename... Rest_>
struct MadeVisitor<Revisitor_, Result_, Case_, Rest_...> :
MadeVisitor<Revisitor_, Result_, Rest_...>
@@ -390,6 +399,12 @@ namespace paludis
{
return this->accept_returning<CallResultType<Case_> >(make_visitor(firstcase, cases...));
}
+
+ template <typename... Cases_>
+ void make_accept(const Cases_ & ... cases) const
+ {
+ this->accept(make_visitor(cases...));
+ }
};
template <typename BaseClass_, typename RealClass_>