Overloading conflict with vector types __m128, __m256 in GCC
-
30-10-2019 - |
Question
I've started playing around with AVX instructions on the new Intel's Sandy Bridge processor. I'm using GCC 4.5.2, TDM-GCC 64bit build of MinGW64.
I want to overload operator<< for ostream to be able to print out the vector types __m256
, __m128
etc to the console. But I'm running into an overloading conflict. The 2nd function in the following code produces an error "conflicts with previous declaration void f(__vector(8) float)
":
void f(__m128 v) {
cout << 4;
}
void f(__m256 v) {
cout << 8;
}
It seems that the compiler cannot distinguish between the two types and consideres them both f(float __vector)
.
Is there a way around this? I haven't been able to find anything online. Any help is greatly appreciated.
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow