[Bug c++/43122] g++ does not allow overloading operators for sse types (__m128, __m128d)
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43122 SergeyN changed: What|Removed |Added CC||nenakhov.sergey at gmail ||dot com --- Comment #6 from SergeyN 2012-09-05 07:42:49 UTC --- well, I get similiar error when I try to overload operators <, <=, ==, etc error: ‘__m256d operator<(__m256d, __m256d)’ must have an argument of class or enumerated type.
[Bug c++/43122] g++ does not allow overloading operators for sse types (__m128, __m128d)
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43122 --- Comment #8 from SergeyN 2012-09-05 09:42:58 UTC --- (In reply to comment #7) > http://gcc.gnu.org/ml/gcc-patches/2012-08/msg02098.html That's nice, but I would really prefer to define my own comparison operator, because the actual comparison instruction for __m256 and __m256d types has a way to control handling of nans, which wouldn't be allowed by a built-in comparison operator.
[Bug c++/43122] g++ does not allow overloading operators for sse types (__m128, __m128d)
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43122 --- Comment #10 from SergeyN 2012-09-05 12:24:49 UTC --- (In reply to comment #9) > Then put it into a class and add overloaded comparison operators for the > wrapper class. That is the same thing as with float/double, you can't > overload > float/double comparison operator either. Well, I'll of course find a way to workaround this issue by either using a class, or using a separate function like cmp_less or something like that. The point of this thread is that operator overloading for vector types doesn't not work in gcc, and not how to work around that (which I'm sure people have no problem doing given that the problem was reported 2 years ago). Sergey.