Subject: Re: [boost] Boost.Algorithm design question
From: Phil Endecott (spam_from_boost_dev_at_[hidden])
Date: 2011-10-06 16:13:47
Dave Abrahams wrote:
> I don't think you can evaluate these choices just by looking at the
> implementations. Before anyone else votes option 1, I'd like to see
> somebody write the description of the algorithm, including the concept
Well we can start by copying what the experts wrote for std::find,
can't we? For the non-predicate version it just says "Returns: The
first iterator i in the range [first,last) for which *i==value holds"
(n3242). none_of_equal could be written in the same style. But you
seem to want something different than that; I guess that you want to
add a requirement on the type of the value, right? If so, why do you
want that even though it wasn't deemed necessary for the standard? But
in any case, it's not hard to write; just require that T is a type for
which *i==value is valid.
What am I missing?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk