I was handed this piece of "cross platform" code and Xcode is
complaining on compile:
The code:
template < class Matrix_ > static void transpose ( Matrix_ &m )
{
std::swap ( m[1], m[4] );
std::swap ( m[2], m[8] );
std::swap ( m[3], m[12] );
std::swap ( m[6], m[9] );
std::swap ( m[7], m[13] );
std::swap ( m[11], m[14] );
}
The Compile Error:
/Usul/Math/Matrix44.h:143: error: 'swap' is not a member of 'std'
I have used stuff from std before.. Is there an include that I need
to do?
Alternatively if some nice soul would like to point me to the AltiVec
function that can simply transpose a 4x4 matrix of floats, that would
be nice. Tried looking in BLAS but there does not seem to be any
easily reachable documentation to read.