Add region ostream operator

This commit is contained in:
Danny Robson 2011-10-20 23:53:30 +11:00
parent 1f4a744b29
commit 30060de999
2 changed files with 15 additions and 0 deletions

View File

@ -158,6 +158,17 @@ namespace util {
}
template <typename T>
std::ostream&
operator<< (std::ostream &os, const region<T> &rhs) {
os << "region(" << rhs.x << ", " << rhs.y << ", " << rhs.width << ", " << rhs.height << ")";
return os;
}
template struct region<unsigned int>;
template struct region<double>;
template std::ostream& operator<< (std::ostream&, const region<unsigned int>&);
template std::ostream& operator<< (std::ostream&, const region<double>&);

View File

@ -70,4 +70,8 @@ namespace util {
};
}
template <typename T>
std::ostream&
operator<< (std::ostream&, const util::region<T>&);
#endif