Re: Must second bind2nd parameter be constant for loop?
Matthew T. Staebler wrote:
It
seems somewhat unfortunate to have to inject parallel-processing
concerns into the predicates being used in the standard algorithms.
Perhaps the standard algorithms are intended to be supplied with
immutable predicates and operators, and having to complicate mutable
predicates and operators is a simly consequence of mangling the intent
of the algorithms.
I don't know. Stepanov didn't write a rationale, at least not
that I know of, and I can't read his mind to know the original
intent. A priori, when I hear that something is a predicate, I
expect it to be a "pure" function, totally dependant on it's
arguments, with no external state. Whether that's the intent of
the original STL or not, however, I can't say. The current
draft of the standard definitly does consider predicates with
shared state, however.
--
James Kanze (GABI Software) email:james.kanze@gmail.com
Conseils en informatique orientie objet/
Beratung in objektorientierter Datenverarbeitung
9 place Simard, 78210 St.-Cyr-l'Icole, France, +33 (0)1 30 23 00 34
--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]