|
Boost Users : |
Subject: Re: [Boost-users] Oven, regular and Boost
From: Akira Takahashi (faithandbrave_at_[hidden])
Date: 2012-12-10 09:47:09
2012/12/10 Robert Jones <robertgbjones_at_[hidden]>
> Ah, now I'm understanding your point better. You're postulating a version
> of for_each which requires copy and assign, just for the purpose of
> exposition.
>
> Got it, thx!
>
> Boost.Range sliced does its slicing by calculating iterator offsets from
> the
> begin and end of its source range, which is why it needs random access
> iterators.
> Its iterator type is also hardwired to be the iterator type of its source
> range.
>
> Frankly I do wonder at wisdom of some its design decisions.
>
> How is this done by OvenToBoost's dropped and taken adaptors? Can you
> point me to the source code?
>
> Thx, Rob.
>
OvenToBoost's repository is here:
https://github.com/faithandbrave/OvenToBoost
https://github.com/faithandbrave/OvenToBoost/blob/master/boost/range/adaptor/taken.hpp
https://github.com/faithandbrave/OvenToBoost/blob/master/boost/range/adaptor/dropped.hpp
`taken` and `dropped` don't use random access, and use forward access.
Thanks,
Akira
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