hprint now can print maps

This commit is contained in:
Zeno Rogue 2021-06-16 12:42:28 +02:00
parent 442a751a33
commit 82b8b02a36
1 changed files with 2 additions and 0 deletions

View File

@ -211,6 +211,8 @@ struct comma_printer {
template<class T, size_t X> void print(hstream& hs, const array<T, X>& a) { print(hs, "("); comma_printer c(hs); for(const T& t: a) c(t); print(hs, ")"); }
template<class T> void print(hstream& hs, const vector<T>& a) { print(hs, "("); comma_printer c(hs); for(const T& t: a) c(t); print(hs, ")"); }
template<class T, class U> void print(hstream& hs, const map<T,U>& a) { print(hs, "("); comma_printer c(hs); for(auto& t: a) c(t); print(hs, ")"); }
inline void print(hstream& hs, const hyperpoint h) { print(hs, (const array<ld, MAXMDIM>&)h); }
inline void print(hstream& hs, const transmatrix T) {
print(hs, "("); comma_printer c(hs);