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:06:53 +0100
commite4904b3a8172b974ec1b50752b944513bc4a2ec2 (patch)
tree71c51d6559cd5902599817dbcaefd798c1397eed
parent1296fb6d8d6f047379a07d89f025ef3f4035b356 (diff)
downloadpaludis-e4904b3a8172b974ec1b50752b944513bc4a2ec2.tar.gz
paludis-e4904b3a8172b974ec1b50752b944513bc4a2ec2.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_())
{