matrix: move ostream operator into util namespace

This commit is contained in:
Danny Robson 2014-08-19 20:46:15 +10:00
parent 22dcf46c61
commit ea5f90dbf2
2 changed files with 29 additions and 22 deletions

View File

@ -405,6 +405,7 @@ namespace util {
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
namespace util {
template <typename T> template <typename T>
std::ostream& std::ostream&
operator<< (std::ostream &os, const matrix<T> &m) { operator<< (std::ostream &os, const matrix<T> &m) {
@ -427,4 +428,7 @@ operator<< (std::ostream &os, const matrix<T> &m) {
return os; return os;
} }
}
template std::ostream& util::operator<< (std::ostream&, const matrix<float>&);
template std::ostream& util::operator<< (std::ostream&, const matrix<double>&);

View File

@ -59,9 +59,12 @@ namespace util {
static const matrix<T> IDENTITY; static const matrix<T> IDENTITY;
static const matrix<T> ZEROES; static const matrix<T> ZEROES;
}; };
}
typedef matrix<float> matrixf;
template <typename T> template <typename T>
std::ostream& operator<< (std::ostream&, const util::matrix<T>&); std::ostream& operator<< (std::ostream&, const util::matrix<T>&);
}
#endif #endif