diff --git a/include/gsl/multi_span b/include/gsl/multi_span index cdde594..dbca3a4 100644 --- a/include/gsl/multi_span +++ b/include/gsl/multi_span @@ -806,17 +806,15 @@ struct is_bounds> : std::integral_constant }; template -class bounds_iterator : public std::iterator +class bounds_iterator { -private: - using Base = std::iterator; - public: static const std::size_t rank = IndexType::rank; - using typename Base::reference; - using typename Base::pointer; - using typename Base::difference_type; - using typename Base::value_type; + using iterator_category = std::random_access_iterator_tag; + using value_type = IndexType; + using difference_type = std::ptrdiff_t; + using pointer = value_type*; + using reference = value_type&; using index_type = value_type; using index_size_type = typename IndexType::value_type; template @@ -1997,14 +1995,13 @@ private: template class contiguous_span_iterator - : public std::iterator { - using Base = std::iterator; - public: - using typename Base::reference; - using typename Base::pointer; - using typename Base::difference_type; + using iterator_category = std::random_access_iterator_tag; + using value_type = typename Span::value_type; + using difference_type = std::ptrdiff_t; + using pointer = value_type*; + using reference = value_type&; private: template @@ -2117,15 +2114,13 @@ contiguous_span_iterator operator+(typename contiguous_span_iterator template class general_span_iterator - : public std::iterator { - using Base = std::iterator; - public: - using typename Base::reference; - using typename Base::pointer; - using typename Base::difference_type; - using typename Base::value_type; + using iterator_category = std::random_access_iterator_tag; + using value_type = typename Span::value_type; + using difference_type = std::ptrdiff_t; + using pointer = value_type*; + using reference = value_type&; private: template