SPROUT_CONSTEXPR result_type operator()( Expr const& expr, context_type const& ctx ) const { return call( sprout::tuples::get<0>(expr.args()) .template operator()(ctx.begin(), ctx.end(), ctx), ctx ); }
SPROUT_CONSTEXPR result_type call( Arg const& arg, context_type const& ctx ) const { return sprout::distance(ctx.begin(), ctx.end()) >= sprout::size(arg) && sprout::equal(sprout::begin(arg), sprout::end(arg), ctx.begin()) ? result_type( true, sprout::next(ctx.begin(), sprout::size(arg)), attribute_type(), context_type(ctx, sprout::next(ctx.begin(), sprout::size(arg))) ) : result_type(false, ctx.begin(), attribute_type(), ctx) ; }
SPROUT_CONSTEXPR result_type operator()( Expr const& expr, context_type const& ctx ) const { typedef typename std::iterator_traits<Iterator>::value_type elem_type; return ctx.begin() != ctx.end() && *ctx.begin() == elem_type(sprout::tuples::get<0>(expr.args())) ? result_type( true, sprout::next(ctx.begin()), attribute_type(), context_type(ctx, sprout::next(ctx.begin())) ) : result_type(false, ctx.begin(), attribute_type(), ctx) ; }