|
Boost Users : |
Subject: Re: [Boost-users] [range] Zip range adaptor
From: Neil Groves (neil_at_[hidden])
Date: 2011-01-27 17:37:19
On Thu, Jan 27, 2011 at 9:48 PM, Nathan Crookston <
nathan.crookston_at_[hidden]> wrote:
> On Thu, Jan 27, 2011 at 1:04 PM, TONGARI <tongari95_at_[hidden]> wrote:
> >> 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?
>
> Yes, I replaced all my uses of unpack with make_fused and everything
> looks like it's working. Thanks for pointing it out. If the range
> authors are interested I'll probably post my code with unpack (which
> depends only on boost::result_of) and let them make the call whether
> they want to introduce a fusion dependency.
>
>
I will provide a zipped Range Adaptor that does not introduce a dependency
on Fusion. I will target Boost 1.47 for this feature. Now that the Range
Adaptor framework is well proven it makes sense to build upon it by
broadening the Range Adaptor facilities. The zipped adaptor is one of the
most frequently requested, and is top of my list.
> This does raise a naming question. MPL uses unpack_args, Fusion uses
> make_fused. I thought unpack was nice (I also like unzip), but I'm
> not dead-set on any particular name. Any thoughts?
>
>
My thoughts on this at the moment are that I will use the MPL names. I will
probably use directly MPL.
> Thanks,
> Nate
>
>
Regards,
Neil Groves
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