aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2013-05-23 12:43:44 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2013-05-23 20:57:35 +0100
commitf91b6e03c2d84dd8de1b5095b3caae404a3bf510 (patch)
treeadf1b1a72ced8f40adb323e665dc21172103ee97
parent9db1dd150c202646f671366e1adae0a93f01f346 (diff)
downloadpaludis-f91b6e03c2d84dd8de1b5095b3caae404a3bf510.tar.gz
paludis-f91b6e03c2d84dd8de1b5095b3caae404a3bf510.tar.xz
Simplify revisiting
-rw-r--r--paludis/util/visitor.hh4
1 files changed, 4 insertions, 0 deletions
diff --git a/paludis/util/visitor.hh b/paludis/util/visitor.hh
index 8b2c0d9..c51429b 100644
--- a/paludis/util/visitor.hh
+++ b/paludis/util/visitor.hh
@@ -23,6 +23,7 @@
#include <paludis/util/attributes.hh>
#include <paludis/util/visitor-fwd.hh>
#include <paludis/util/no_type.hh>
+#include <functional>
namespace paludis
{
@@ -218,6 +219,9 @@ namespace paludis
return BaseMadeVisitor<CallResultType<Case_>, Case_, Cases_...>{ firstcase, cases... };
}
+ template <typename Result_, typename Base_>
+ using Revisit = std::function<Result_ (const Base_ &)>;
+
template <>
class DeclareAbstractVisitMethods<TypeListTail>
{