SVE types are defined to be opaque built-in types that by default
can only be used via intrinsics. One consequence of this is that
the types provide no built-in versions of the unary and binary
arithmetic operators.
Instead, the ACLE allows users to define non-member operators
for SVE types, in much the same way as standard C++ does for
enumerator types, and as Clang as an extension does for matrix types.
See section 3.6 of the ACLE at:
https://developer.arm.com/documentation/100987/0000/
for details.
In response to earlier feedback from the Clang community (thanks!),
the ACLE requires overloads to be static or to be defined within a
namespace if all overloadable parameter types are sizeless types.
This reduces the risk of an accidental ODR violation if two objects
use different overloads of the same operation. (That kind of ODR
violation seems more likely for sizeless types than for classes
or enums, since classes and enums are defined explicitly by a given
piece of translated code, whereas SVE types are built directly into
the compiler.)
The patch triggers a duplicate warning for:
ref_int8 = ref_int8;
but it seemed better to fix that separately.
Unnecessary parentheses