From 3f216bac5e4ecd5723df815d13cae7ede4ad21dc Mon Sep 17 00:00:00 2001 From: chriseth Date: Tue, 2 Oct 2018 10:52:53 +0200 Subject: Generic visitor. --- libsolidity/inlineasm/AsmScope.h | 27 ++------------------------- 1 file changed, 2 insertions(+), 25 deletions(-) (limited to 'libsolidity/inlineasm') diff --git a/libsolidity/inlineasm/AsmScope.h b/libsolidity/inlineasm/AsmScope.h index c8c63f8f..fc674e71 100644 --- a/libsolidity/inlineasm/AsmScope.h +++ b/libsolidity/inlineasm/AsmScope.h @@ -22,6 +22,8 @@ #include +#include + #include #include @@ -35,31 +37,6 @@ namespace solidity namespace assembly { -template -struct GenericVisitor{}; - -template -struct GenericVisitor: public GenericVisitor -{ - using GenericVisitor::operator (); - explicit GenericVisitor( - std::function _visitor, - std::function... _otherVisitors - ): - GenericVisitor(_otherVisitors...), - m_visitor(_visitor) - {} - - void operator()(Visitable& _v) const { m_visitor(_v); } - - std::function m_visitor; -}; -template <> -struct GenericVisitor<>: public boost::static_visitor<> { - void operator()() const {} -}; - - struct Scope { using YulType = std::string; -- cgit