Boost logo

Boost :

Subject: Re: [boost] Proposed Library Boost.Algorithm
From: Marshall Clow (mclow.lists_at_[hidden])
Date: 2011-03-30 19:17:14


On Mar 30, 2011, at 3:55 PM, Steven Watanabe wrote:
>> 2) A set of predicates for determining if a sequence is ordered (by some criteria) (ordered.hpp)
>> Originally written by Grant Erickson during the "Library in a week" session at Boostcon 2008, and reworked somewhat by myself.
>>
>
> The range library has some extra magic to
> control the return type of find etc. Maybe
> it should be used here too?

I'll take a look.
I went back and forth on these routines - should they return an iterator, or just a boolean?
A boolean would tell you if the whole sequence is sorted, an iterator tells you where the first out of order item is; == end -> no items are out of order.

I compromised - I wrote the basic routine to return an iterator, and the "wrapper" routines return bool.

>> 3) A set of predicates for determining other properties of a sequence, based on some suggestions for C++0x. (all.hpp)
>>
>
> The range overload of one_of_if should
> take a const R& argument.

D'oh!

I wrote the Doxygen comment correctly, but not the code!

Thanks!

-- Marshall

Marshall Clow Idio Software <mailto:mclow.lists_at_[hidden]>

A.D. 1517: Martin Luther nails his 95 Theses to the church door and is promptly moderated down to (-1, Flamebait).
        -- Yu Suzuki


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