[Boost-bugs] [Boost C++ Libraries] #13385: Docs for for_each() should be clearer about forbidding "any non-constant operation"

Subject: [Boost-bugs] [Boost C++ Libraries] #13385: Docs for for_each() should be clearer about forbidding "any non-constant operation"
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2018-01-09 12:19:51


#13385: Docs for for_each() should be clearer about forbidding "any non-constant
operation"
-------------------------------------------------+-------------------------
 Reporter: Tony Lewis <tonyelewis@…> | Owner: Neil Groves
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: range
  Version: Boost 1.66.0 | Severity: Problem
 Keywords: |
  range,for_each,docs,requirements,const |
-------------------------------------------------+-------------------------
 The docs for Range's (single-range) `for_each()` function specify the
 requirement:

> !UnaryFunction does not apply any non-constant operation through its
 argument.

 I think this wording could it be clearer. Does it mean that the it mustn't
 modify the value passed to it? If not, I think it would benefit from
 rewording. If so, isn't that quite different to `std::for_each()`. If
 that's deliberate, I suggest it's worth a brief note highlighting and
 justifying the difference. Otherwise, I suggest it's worth fixing.

 Thanks very much.

-- 
Ticket URL: <https://svn.boost.org/trac10/boost/ticket/13385>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2018-01-09 12:25:19 UTC