Opened 5 years ago
#13385 new Bugs
Docs for for_each() should be clearer about forbidding "any non-constant operation"
Reported by: | Owned by: | Neil Groves | |
---|---|---|---|
Milestone: | To Be Determined | Component: | range |
Version: | Boost 1.66.0 | Severity: | Problem |
Keywords: | range, for_each, docs, requirements, const | Cc: |
Description
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.
Note:
See TracTickets
for help on using tickets.