2014-06-29 22:49:26 +10:00
|
|
|
|
|
|
|
#ifdef __UTIL_IO_IPP
|
|
|
|
#error "multiple inclusions"
|
|
|
|
#else
|
|
|
|
#define __UTIL__IO_IPP
|
|
|
|
#endif
|
|
|
|
|
|
|
|
namespace util {
|
|
|
|
template <typename T>
|
|
|
|
indented<T>::indented (const T &_data):
|
|
|
|
data (_data)
|
|
|
|
{ ; }
|
|
|
|
|
|
|
|
|
|
|
|
template <typename T>
|
|
|
|
indented<T>
|
|
|
|
make_indented (const T &_data) {
|
|
|
|
return indented<T> (_data);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
template <typename T>
|
|
|
|
std::ostream&
|
2014-07-15 19:48:00 +10:00
|
|
|
operator<< (std::ostream &os, const util::indented<T> &&v) {
|
2014-06-29 22:49:26 +10:00
|
|
|
util::indenter raii (os);
|
|
|
|
os << v.data;
|
|
|
|
return os;
|
|
|
|
}
|