io: move identer ostream to util namespace

This commit is contained in:
Danny Robson 2014-08-01 20:43:51 +10:00
parent a3dcdeb7a3
commit 51b119f0fc
2 changed files with 15 additions and 12 deletions

13
io.hpp
View File

@ -87,10 +87,18 @@ namespace util {
}; };
//-------------------------------------------------------------------------
template <typename T> template <typename T>
indented<T> indented<T>
make_indented (const T &_data); make_indented (const T &_data);
//-------------------------------------------------------------------------
template <typename T>
std::ostream&
operator<< (std::ostream &os, const util::indented<T> &v);
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
class scoped_cwd { class scoped_cwd {
public: public:
@ -147,11 +155,6 @@ namespace util {
}; };
} }
template <typename T>
std::ostream&
operator<< (std::ostream &os, const util::indented<T> &v);
#include "io.ipp" #include "io.ipp"
#endif #endif

2
io.ipp
View File

@ -17,7 +17,6 @@ namespace util {
make_indented (const T &_data) { make_indented (const T &_data) {
return indented<T> (_data); return indented<T> (_data);
} }
}
template <typename T> template <typename T>
@ -27,3 +26,4 @@ operator<< (std::ostream &os, const util::indented<T> &&v) {
os << v.data; os << v.data;
return os; return os;
} }
}