Given the following function call:
f(g(), h())
since the order of evaluating the arguments of the function is unspecified (still takes place in C ++ 11, as far as I know), can theoretically execute a parallel implementation of g() and h() ?
Such parallelization could only hit, g and h , as you know, quite trivial (in the most obvious case, accessing only local data to their bodies) so as not to introduce concurrency problems, but apart from this restriction, I see nothing to it to prohibit.
So, does the standard allow it? Even if only by the as-if rule?
(In this answer , Mankarse claims otherwise, however he does not quote the standard, and my reading of [expr.call] has not shown any obvious wording.)
c ++ language-lawyer
Lightness Races in Orbit Nov 18 '12 at 19:08 2012-11-18 19:08
source share