matrix: remove iostream include from the header
This commit is contained in:
parent
0977fb89b3
commit
986e7d18d8
23
matrix.cpp
23
matrix.cpp
@ -349,3 +349,26 @@ cruft::to_euler (const matrix<Rows,Cols,T> &m)
|
||||
template cruft::vector<3,float> cruft::to_euler (const matrix<3,3,float>&);
|
||||
template cruft::vector<3,float> cruft::to_euler (const matrix<4,4,float>&);
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
#include "iterator/infix.hpp"
|
||||
#include "coord/iostream.hpp"
|
||||
|
||||
#include <ostream>
|
||||
|
||||
|
||||
template <std::size_t Rows, std::size_t Cols, typename T>
|
||||
std::ostream&
|
||||
cruft::operator<< (std::ostream &os, matrix<Rows,Cols,T> const &m)
|
||||
{
|
||||
os << '[';
|
||||
std::copy (
|
||||
std::cbegin (m),
|
||||
std::cend (m),
|
||||
iterator::infix_iterator<decltype(m[0])> (os, ", ")
|
||||
);
|
||||
return os << ']';
|
||||
}
|
||||
|
||||
|
||||
template std::ostream& cruft::operator<< (std::ostream&, matrix<4,4,f32> const&);
|
15
matrix.hpp
15
matrix.hpp
@ -544,22 +544,11 @@ namespace cruft {
|
||||
}
|
||||
|
||||
|
||||
#include "iterator/infix.hpp"
|
||||
#include "coord/iostream.hpp"
|
||||
#include <ostream>
|
||||
#include <iosfwd>
|
||||
|
||||
namespace cruft {
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
template <std::size_t Rows, std::size_t Cols, typename T>
|
||||
std::ostream&
|
||||
operator<< (std::ostream &os, const matrix<Rows,Cols,T> &m)
|
||||
{
|
||||
os << '[';
|
||||
std::copy (
|
||||
std::cbegin (m),
|
||||
std::cend (m),
|
||||
iterator::infix_iterator<decltype(m[0])> (os, ", ")
|
||||
);
|
||||
return os << ']';
|
||||
operator<< (std::ostream &os, matrix<Rows,Cols,T> const&);
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user