更新时间:2022-03-10 19:19:12
来自cppreference:binary_op如果binary_op不是关联的或非可交换的,则行为是不确定的。&q;这是您观察到的;您的行为不是可交换的。
binary_op
std::transform_reduce
r = std::transform_reduce( std::execution::par, citBegin, citEnd, 0ull, std::plus<uint64_t>{}, f);
在具有并行执行策略的<;numeric>;中使用std::Reduce()中的BinaryOp