This compiles despite there isn't defined opEqals for core.simd vectors import core.simd; struct S { int4 vec; } void main() { S a, b; assert(a == b); // While this doesn't //int4 a, b //assert(a == b); } DMD64 D Compiler v2.070
This is normal for a struct, a default comparison occurs, i.e on the whole structure. The real issue here is then that vectors of same type cant be compared, and this has been already reported. *** This issue has been marked as a duplicate of issue 13852 ***