Boost logo

Boost :

Subject: Re: [boost] [Review:Algorithms] is_ordered behaviour for singleton input, and name
From: Andrew Sutton (asutton.list_at_[hidden])
Date: 2011-09-23 22:21:34


Consider renaming *_of_val to *_equal. So:

all_equal
none_equal
any_equal
one_equal

Saying _of_val doesn't actually say anything about relation used in
the algorithm. Maybe *_equal_to so as not to imply that all_equal
means "all values are the same".

You might also consider renaming the header to "quantifier.hpp" since
all of these algorithms quantify some property of a sequence. EoP also
refers to these as quantifiers, IIRC. I left the book at work so I
can't check.

One a side note, I like the addition of one_of to this group. The
implementation is appreciably concise.


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