Subject: Re: [boost] [Review:Algorithms] - Review by Neil Groves
From: Dave Abrahams (dave_at_[hidden])
Date: 2011-10-18 15:16:40
on Tue Oct 18 2011, Marshall Clow <mclow.lists-AT-gmail.com> wrote:
> On Oct 18, 2011, at 6:42 AM, Dave Abrahams wrote:
>> on Mon Oct 17 2011, Marshall Clow <mclow.lists-AT-gmail.com> wrote:
>>> [heading Exception Safety]
>>> All of the variants of `all_of` and `all_of_equal` take their
>>> parameters by value or const reference, and do not depend upon any
>>> global state. Therefore, all the routines in this file provide the
>>> strong exception guarantee.
>> It may be true, but it's not an appropriate conclusion from the
>> premises. std::copy also takes all its parameters by value.
> Good point - how would you state it, then?
> "Only reads from the iterators" is the key point (unlike std::copy)
You state it by saying it's a pure function.
However, I agree with Robert that it doesn't help. In fact, I think it
hurts. This makes it sound almost like something that might change in
the future, rather than like a guarantee clients can rely on.
-- Dave Abrahams BoostPro Computing http://www.boostpro.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk