https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101274

--- Comment #4 from Thomas Rodgers <rodgertq at gcc dot gnu.org> ---
I did some more reading of
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/n4878.pdf and it would
seem that you are not even guaranteed a deterministic ordering of the
application of binary_op on the non-execution policy accepting overloads of
std::reduce().

See [reduce] the note at bullet 9 -

"[Note 1 : The difference between reduce and accumulate is that reduce applies
binary_op in an unspecified order, which yields a nondeterministic result for
non-associative or non-commutative binary_op such as floating-point addition. —
end note]"

Reply via email to