示例#1
0
			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
					);
			}
示例#2
0
			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)
					;
			}
示例#3
0
			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)
					;
			}