extent: add convenience make_range iterator creator

This commit is contained in:
Danny Robson 2017-07-04 16:18:57 +10:00
parent 564d6ab753
commit 825102a328

View File

@ -73,7 +73,7 @@ namespace util {
extent<S,T> m_target;
};
extent_range (extent<S,T> target);
explicit extent_range (extent<S,T> target);
iterator begin (void) const;
iterator end (void) const;
@ -82,6 +82,13 @@ namespace util {
extent<S,T> m_target;
};
template <size_t S, typename T>
extent_range<S,T>
make_range (extent<S,T> e)
{
return extent_range<S,T> {e};
}
// convenience typedefs
template <typename T> using extent2 = extent<2,T>;
template <typename T> using extent3 = extent<3,T>;