Skip to content
Snippets Groups Projects
Commit 98d02cb5 authored by Jö Fahlke's avatar Jö Fahlke
Browse files

[SIMD] Only try and apply assignment to non-const lvalues in tests.

A non-const class rvalue is, in fact, assignable, unless you take special
care.  In the tests we try to apply each operator to `Scalar<V>` in an
unevaluated context, and if that succeeds we require that it works for `V`
analogously to how it does for `Scalar<V>`.

That heuristic fails if `Scalar<V>` is a class (such as `std::complex`),
because assignment works even to rvalues (usually), but trying to apply the
assignment to a `V` rvalue and then capturing and examining the result will
lead to undefined behaviour.
parent 3301b95a
Branches
Tags
Loading
Pipeline #
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment