diff --git a/include/VisitorUtils.hpp b/include/VisitorUtils.hpp index 1f2f181d..084bdbe1 100644 --- a/include/VisitorUtils.hpp +++ b/include/VisitorUtils.hpp @@ -44,9 +44,8 @@ namespace eddic { * \param visitable The object to visit. * \return The result of the visit. */ -template -inline typename std::enable_if::value, typename Visitor::result_type>::type -visit(Visitor&& visitor, Visitable& visitable){ +template +inline Visitor::result_type visit(Visitor && visitor, Visitable & visitable) { return boost::apply_visitor(std::forward(visitor), visitable); } @@ -56,34 +55,11 @@ visit(Visitor&& visitor, Visitable& visitable){ * \param visitable The object to visit. * \return The result of the visit. */ -template -inline typename std::enable_if::value, typename Visitor::result_type>::type -visit(Visitor&& visitor, const Visitable& visitable){ +template +inline Visitor::result_type visit(Visitor && visitor, const Visitable & visitable) { return boost::apply_visitor(std::forward(visitor), visitable); } -/*! - * Apply the visitor to the given object. - * \param visitor The visitor to apply. - * \param visitable The object to visit. - */ -template -inline typename std::enable_if::value, typename Visitor::result_type>::type -visit(Visitor&& visitor, Visitable& visitable){ - boost::apply_visitor(std::forward(visitor), visitable); -} - -/*! - * Apply the visitor to the given object. - * \param visitor The visitor to apply. - * \param visitable The object to visit. - */ -template -inline typename std::enable_if::value, typename Visitor::result_type>::type -visit(Visitor&& visitor, const Visitable& visitable){ - boost::apply_visitor(std::forward(visitor), visitable); -} - /*! * Apply the visitor to the given object. * \param visitor The visitor to apply.