|
Boost Users : |
Subject: Re: [Boost-users] [range] Zip range adaptor
From: TONGARI (tongari95_at_[hidden])
Date: 2011-01-27 15:04:06
2011/1/28 Nathan Crookston <nathan.crookston_at_[hidden]>
>
> [...]
I decided to create a new range adaptor based the zip_iterator which
reduces the verbosity of the loop declaration. Such an adaptor is
common for this problem [2][3]. I was surprised that I couldn't find
this already in the range library. (Feel free to disabuse me if
> necessary.)
>
I'm with you. IMHO, that's something missed in Boost.Range.
boost::for_each(zip(images, offsets) | strided(2),
> unzip(AddToMosaic(mosaic)));
> [...]
> The unpack() function would be useful for the zip_iterator as well.
>
Is Fusion's make_fused() the equivalent?
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net