diff --git a/thin-provisioning/range.h b/thin-provisioning/range.h index 8345c18..9c41d9b 100644 --- a/thin-provisioning/range.h +++ b/thin-provisioning/range.h @@ -2,6 +2,7 @@ #define THIN_RANGE_H #include +#include //---------------------------------------------------------------- @@ -23,6 +24,24 @@ namespace thin_provisioning { maybe begin_; maybe end_; }; + + template + std::ostream & + operator <<(std::ostream &out, range const &r) { + if (r.begin_) + out << "[" << *r.begin_; + else + out << "[-"; + + out << ", "; + + if (r.end_) + out << *r.end_ << "]"; + else + out << "-]"; + + return out; + } } //----------------------------------------------------------------