31 lines
563 B
C
Raw Normal View History

2013-04-29 15:10:01 +01:00
#ifndef THIN_RANGE_H
#define THIN_RANGE_H
#include <boost/optional.hpp>
//----------------------------------------------------------------
namespace thin_provisioning {
template <typename T>
class range {
public:
typedef boost::optional<T> maybe;
range(maybe begin = maybe(), maybe end = maybe())
: begin_(begin),
end_(end) {
}
2013-04-29 16:12:34 +01:00
bool operator ==(range<T> const &r) const {
return (begin_ == r.begin_ && end_ == r.end_);
}
2013-04-29 15:10:01 +01:00
maybe begin_;
maybe end_;
};
}
//----------------------------------------------------------------
#endif