File indexing completed on 2025-01-30 09:48:15
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #ifndef BOOST_MULTI_ARRAY_EXTENT_RANGE_HPP
0014 #define BOOST_MULTI_ARRAY_EXTENT_RANGE_HPP
0015
0016 #include <utility>
0017
0018 namespace boost {
0019 namespace detail {
0020 namespace multi_array {
0021
0022 template <typename Extent, typename SizeType>
0023 class extent_range : private std::pair<Extent,Extent> {
0024 typedef std::pair<Extent,Extent> super_type;
0025 public:
0026 typedef Extent index;
0027 typedef SizeType size_type;
0028
0029 extent_range(index start, index finish) :
0030 super_type(start,finish) { }
0031
0032 extent_range(index finish) :
0033 super_type(0,finish) { }
0034
0035 extent_range() : super_type(0,0) { }
0036
0037 index start() const { return super_type::first; }
0038
0039 index finish() const { return super_type::second; }
0040
0041 size_type size() const { return super_type::second - super_type::first; }
0042 };
0043
0044 }
0045 }
0046 }
0047
0048
0049 #endif