Add region ostream operator
This commit is contained in:
parent
1f4a744b29
commit
30060de999
11
region.cpp
11
region.cpp
@ -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<unsigned int>;
|
||||||
template struct region<double>;
|
template struct region<double>;
|
||||||
|
|
||||||
|
template std::ostream& operator<< (std::ostream&, const region<unsigned int>&);
|
||||||
|
template std::ostream& operator<< (std::ostream&, const region<double>&);
|
||||||
|
|
||||||
|
@ -70,4 +70,8 @@ namespace util {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
std::ostream&
|
||||||
|
operator<< (std::ostream&, const util::region<T>&);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user