$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [Boost-users] [fusion] for_each with indices
From: Christopher Schmidt (christopher_at_[hidden])
Date: 2012-07-30 21:23:43
AgustÃn K-ballo Bergé <kaballo86_at_[hidden]> writes:
> However, I would like to get the index as a compile time value. What
> would be the simpler/best way to do this? Creating an iterator adaptor
> that keeps track of advances to the base iterator (should I be using
> the iterator_facade extension mechanism)? Or perhaps zipping the
> sequence with some kind of infinite mpl::vector_c sequence?
I would use fusion::fold with the index stored as state via a
mpl::int_.
Christopher