How to swap two __m128i variables in C++03 given its an opaque type and an array?
问题 What is the best practice for swapping __m128i variables? The background is a compile error under Sun Studio 12.2, which is a C++03 compiler. __m128i is an opaque type used with MMX and SSE instructions, and its usually and unsigned long long[2] . C++03 does not provide the support for swapping arrays, and std:swap(__m128i a, __m128i b) fails under the compiler. Here are some related questions that don't quite hit the mark. They don't apply because std::vector is not available. How can we