public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/48870] New: operator== overload of vector types
@ 2011-05-04 14:13 john.salmon at deshaw dot com
2011-05-05 10:30 ` [Bug c++/48870] " rguenth at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: john.salmon at deshaw dot com @ 2011-05-04 14:13 UTC (permalink / raw)
To: gcc-bugs
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: unassigned@gcc.gnu.org
ReportedBy: john.salmon@deshaw.com
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?
salmonj@drdlogin0039.en.desres$ 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);
}
salmonj@drdlogin0039.en.desres$ 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
salmonj@drdlogin0039.en.desres$
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/48870] operator== overload of vector types
2011-05-04 14:13 [Bug c++/48870] New: operator== overload of vector types john.salmon at deshaw dot com
@ 2011-05-05 10:30 ` rguenth at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-05-05 10:30 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48870
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |WONTFIX
--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-05-05 10:27:32 UTC ---
No, it can't be fixed. You have to provide a wrapper yourself.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-05-05 10:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-04 14:13 [Bug c++/48870] New: operator== overload of vector types john.salmon at deshaw dot com
2011-05-05 10:30 ` [Bug c++/48870] " rguenth at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).