http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48870
Summary: operator== overload of vector types
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: c++
AssignedTo: [email protected]
ReportedBy: [email protected]
I'd like to overload operator== for vector (e.g., SSE __m128i) types. It seems
that __m128i is neither of class nor enumerated types, which makes it
unsuitable for operator-overload. Can this be fixed?
[email protected]$ cat m128.cpp
#include <x86intrin.h>
bool operator==(__m128i a, __m128i b){
__m128i x = _mm_xor_si128(a, b);
return _mm_testz_si128(x, x);
}
[email protected]$ dw -m gcc/4.6.0-23A/bin g++ -msse4.2 m128.cpp
m128.cpp:3:37: error: 'bool operator==(__m128i, __m128i)' must have an argument
of class or enumerated type
[email protected]$