File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -42,11 +42,17 @@ template <class T, class W>
4242class Span {
4343 public:
4444 using value_type = W;
45- using const_W = typename :: std::add_const<W>::type;
45+ using const_W = typename std::add_const<W>::type;
4646
4747 template <class W1 >
48- class iterator_base : public std ::iterator<std::input_iterator_tag, W> {
48+ class iterator_base {
4949 public:
50+ using iterator_category = std::input_iterator_tag;
51+ using value_type = W;
52+ using difference_type = std::ptrdiff_t ;
53+ using pointer = const W*;
54+ using reference = const W&;
55+
5056 inline iterator_base (T* ptr, T* end) : ptr_{ptr}, end_{end} { CHECK_GE (end, ptr); }
5157
5258 inline W1 operator *() { return W1 (*ptr_); }
@@ -62,7 +68,7 @@ class Span {
6268
6369 inline bool operator !=(iterator_base<W1> other) { return !(*this == other); }
6470
65- template <class X = W1, typename = :: std::enable_if_t <!:: std::is_const<X>::value> >
71+ template <class X = W1, typename = std::enable_if_t <!std::is_const<X>::value> >
6672 inline operator iterator_base<const_W>() const {
6773 return iterator_base<const_W>(ptr_, end_);
6874 }
You can’t perform that action at this time.
0 commit comments