Boost logo

Boost :

From: David B. Held (dheld_at_[hidden])
Date: 2002-11-25 11:07:48


"David Abrahams" <dave_at_[hidden]> wrote in message
news:uznrx4txh.fsf_at_boost-consulting.com...
> [...]
> Well I hope that was all instructive, but it was probably way more
> complicated than neccessary. I think it would actually be far superior
> to build a solution around an mpl iterator adaptor like this one:
>
> template <class IteratorSeq> struct zip_iterator
> {
> typedef typename mpl::transform<
> IteratorSeq,mpl::apply0<mpl::_1>
> >::type type;
>
> typedef zip_iterator<
> typename mpl::transform<
> IteratorSeq,mpl::next<mpl::_1>
> >::type
> > next;
> };
> [...]

Hey, you just wrote an MPL iterator adaptor! Cool!

Dave


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk