aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-09-25 09:05:00 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-09-25 01:05:08 +0100
commitdeeedf94b29f74c852142c004fe70ecadbd7b114 (patch)
tree71c51d6559cd5902599817dbcaefd798c1397eed
parentd3959fa8e0ad526901f0b7ff0c46c8c82afc6992 (diff)
downloadpaludis-deeedf94b29f74c852142c004fe70ecadbd7b114.tar.gz
paludis-deeedf94b29f74c852142c004fe70ecadbd7b114.tar.xz
Allow const void visitors too
-rw-r--r--paludis/util/simple_visitor.hh14
1 files changed, 14 insertions, 0 deletions
diff --git a/paludis/util/simple_visitor.hh b/paludis/util/simple_visitor.hh
index d458fd5..0920524 100644
--- a/paludis/util/simple_visitor.hh
+++ b/paludis/util/simple_visitor.hh
@@ -140,6 +140,20 @@ namespace paludis
_real_accept_const(vv);
}
+ template <typename UnwrappedVisitor_>
+ void accept(const UnwrappedVisitor_ & v)
+ {
+ WrappedVoidResultVisitor<VisitableTypeList_, const UnwrappedVisitor_> vv(v);
+ _real_accept(vv);
+ }
+
+ template <typename UnwrappedVisitor_>
+ void accept(const UnwrappedVisitor_ & v) const
+ {
+ WrappedVoidResultVisitor<typename MakeTypeListConst<VisitableTypeList_>::Type, const UnwrappedVisitor_> vv(v);
+ _real_accept_const(vv);
+ }
+
template <typename Result_, typename UnwrappedVisitor_>
Result_ accept_returning(UnwrappedVisitor_ & v, const Result_ & r = Result_())
{