@@ -828,7 +828,7 @@ inline void swap(int_vector_reference<bit_vector> x,
828
828
829
829
830
830
template <class t_int_vector >
831
- class int_vector_iterator_base : public std ::iterator<std::random_access_iterator_tag, typename t_int_vector::value_type, typename t_int_vector::difference_type>
831
+ class int_vector_iterator_base
832
832
{
833
833
public:
834
834
typedef uint64_t size_type;
@@ -849,12 +849,14 @@ class int_vector_iterator : public int_vector_iterator_base<t_int_vector>
849
849
{
850
850
public:
851
851
852
- typedef int_vector_reference<t_int_vector> reference;
853
- typedef uint64_t value_type;
852
+ using iterator_category = std::random_access_iterator_tag;
853
+ using value_type = typename t_int_vector::value_type;
854
+ using difference_type = typename t_int_vector::difference_type;
855
+ using pointer = typename t_int_vector::value_type*;
856
+ using reference = int_vector_reference<t_int_vector>;
857
+
854
858
typedef int_vector_iterator iterator;
855
- typedef reference* pointer;
856
859
typedef typename t_int_vector::size_type size_type;
857
- typedef typename t_int_vector::difference_type difference_type;
858
860
859
861
friend class int_vector_const_iterator <t_int_vector>;
860
862
private:
@@ -1011,11 +1013,14 @@ class int_vector_const_iterator : public int_vector_iterator_base<t_int_vector>
1011
1013
{
1012
1014
public:
1013
1015
1014
- typedef typename t_int_vector::value_type const_reference;
1015
- typedef const typename t_int_vector::value_type* pointer;
1016
+ using iterator_category = std::random_access_iterator_tag;
1017
+ using value_type = const typename t_int_vector::value_type;
1018
+ using difference_type = typename t_int_vector::difference_type;
1019
+ using pointer = const typename t_int_vector::value_type*;
1020
+ using reference = const typename t_int_vector::value_type;
1021
+
1016
1022
typedef int_vector_const_iterator const_iterator;
1017
1023
typedef typename t_int_vector::size_type size_type;
1018
- typedef typename t_int_vector::difference_type difference_type;
1019
1024
1020
1025
template <class X >
1021
1026
friend typename int_vector_const_iterator<X>::difference_type
@@ -1045,7 +1050,7 @@ class int_vector_const_iterator : public int_vector_iterator_base<t_int_vector>
1045
1050
return *this ;
1046
1051
}
1047
1052
1048
- const_reference operator *() const
1053
+ reference operator *() const
1049
1054
{
1050
1055
return bits::read_int (m_word, m_offset, m_len);
1051
1056
}
@@ -1126,7 +1131,7 @@ class int_vector_const_iterator : public int_vector_iterator_base<t_int_vector>
1126
1131
return it -= i;
1127
1132
}
1128
1133
1129
- const_reference operator [](difference_type i) const
1134
+ reference operator [](difference_type i) const
1130
1135
{
1131
1136
return *(*this + i);
1132
1137
}
0 commit comments