mattkretz / wg21-papers

my papers to WG21 — the C++ committee
5 stars 7 forks source link

Why do simd reductions allow binary ops on T? #67

Open mattkretz opened 6 years ago

mattkretz commented 6 years ago
template <class T, class Abi, class BinaryOperation = plus<>>
T reduce(const simd<T, Abi>& x, BinaryOperation binary_op = {});

Requires: binary_op shall be callable with two arguments of type T returning T, or callable with two arguments of type simd<T, A1> returning simd<T, A1> for every A1 that is an ABI tag type.

Why isn't this “Requires: binary_op shall be callable with two arguments of type simd<T, A1> returning simd<T, A1> for every A1 that is an ABI tag type.”?