Boost logo

Boost :

From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2004-11-08 10:57:38


"John Torjo" <john.lists_at_[hidden]> wrote in message
news:418F4161.7050202_at_torjo.com...
| Dear boosters,
|
| I have updated the Iterable Range Library (formely known as Range
| Templates Library).

First let me say that I think the library is ready for a review. (I think we
need two people to say so by the new submission procedure).

Some comments:

1.

I prefer a more explicit version of
a.. r.begin(new_begin) - resets the range's begin
a.. r.end(new_end) - resets the range's end
ie, I would like to see set_begin(...).

// STL version
std::transform( v1.begin(), v1.end(), v2.begin(), std::back_inserter(v3),
std::max<int>);

// rng:: version
rng::transform( v1, v2, std::back_inserter(v3), std::max<int>);
--------------------

initially an iterator would be enough in place of v2. So in some sense I think
you should mention that you have make the requirement a bit
stricter.

3.
The docs for The i_ or i_param shortcut could be better.

4. "The coll_find is a shortcut for finding an element in a collection
(non-associative array). ". The example then shows a map. Isn't a map an
associative container?

5. some more docs on range adapters should be added. As a minimum requirement
we need the synopsis of transformed() etc so we can see what it returns and
takes.
   I some sense you have a very good toturial...now we need the reference
docs.

6. from some of the sorce files, you seems to be using r.begin() instead of
begin(r).

7. "to_end: return the [found, container.end()) range (this is the default"

how do you implement defaults on function templates???

8. have you thought about flags for error-strategies:

    find<or_throw>( v, 5 );
    find( v, 5 );
    find<to_end,or_throw>( v, 5 );

-Thorsten


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