|
Boost Users : |
Subject: Re: [Boost-users] [Range] Sliced... less than it could be.
From: Akira Takahashi (faithandbrave_at_[hidden])
Date: 2012-12-10 05:04:27
Hi, Robert
2012/12/10 Robert Jones <robertgbjones_at_[hidden]>
> I was disappointed to discover that I can't write
>
> range | filtered( some_predicate ) | sliced( n, m ) | .....
>
> because sliced requires a random access range, and filtered produces a
> forward range!
>
> Piffle.
>
> It seems such a useful and obvious use-case. Is this restriction really
> necessary?
>
> Thx, Rob.
>
>
I think this spec is unnecessity restriction.
My OvenToBoost's "taken" and "dropped" adaptors requirement is
SinglePassRange.
http://dl.dropbox.com/u/1682460/git/OvenToBoost/libs/range/doc/html/range_extension/reference/range_adaptors/taken.html
http://dl.dropbox.com/u/1682460/git/OvenToBoost/libs/range/doc/html/range_extension/reference/range_adaptors/dropped.html
I can write follow:
range | filtered(some_predicate) | dropped(n) | taken(m)
This extension is now proposing to Boost.Range.
I think "sliced" adaptor should be same requirements.
>>========================
Akira Takahashi
site: https://sites.google.com/site/faithandbrave/about/en
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