Boost logo

Boost :

Subject: Re: [boost] [iterator] why isn't there a mapped_type iterator adaptor in boost?
From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2010-05-18 04:50:49


Mostafa skrev:
> On Sun, 16 May 2010 03:06:07 -0700, Neil Groves
> <neil_at_[hidden]> wrote:
>
>>> Of course if you wish to contribute to the tutorial that would be
>>> very welcome.
>>
>> Let me see what I can come up with.
>
> Attached is a sketch of my proposed tutorial. Please comment/amend as
> appropriate.

"Informally, a Range is any type that can be associated with a
collection of objects of some arbitrary type or types. Hence, a Range
is a concept, like that of an STL Container. The motivation for the
Range concept is that there are many useful Container-like types that do
not meet the full requirements of Container, and many algorithms that
can be written with this reduced set of requirements"

- I would refrase the first sentence to

"Informally, a Range is any type that can be associated with a
collection of objects and which allows one to iterate over all the
elements of the collection."

- I would refrase the third sentence as

"The motivation for the Range concept is that is provides
a simpler and more expressive encapsulation of a half-open
iterator range [begin,end) that is normally used in interfaces of
containers and in specification of generic algorithms."

-Thorsten


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