Changes in src/Common/VectorMap.h [fc1a3e2:6b0b624]
- File:
-
- 1 edited
-
src/Common/VectorMap.h (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Common/VectorMap.h
rfc1a3e2 r6b0b624 36 36 typedef const value_type* pointer; 37 37 typedef const const_value_type* const_pointer; 38 39 class iterator : public std::iterator< 40 std::random_access_iterator_tag, 41 value_type, difference_type, pointer, reference > { 42 friend class VectorMap; 43 friend class const_iterator; 44 38 39 class iterator : public std::iterator< std::random_access_iterator_tag, 40 value_type, 41 difference_type, 42 pointer, 43 reference > { 44 friend class VectorMap; 45 friend class const_iterator; 46 45 47 value_type data; 46 48 … … 97 99 return data.first == o.data.first && &data.second == &o.data.second; 98 100 } 99 101 100 102 bool operator!= (const iterator& that) const { return !(*this == that); } 101 103 … … 109 111 }; 110 112 111 class const_iterator : public std::iterator< 112 std::bidirectional_iterator_tag, 113 const_value_type, difference_type, const_pointer, const_reference > { 114 friend class VectorMap; 113 class const_iterator : public std::iterator< std::bidirectional_iterator_tag, 114 const_value_type, 115 difference_type, 116 const_pointer, 117 const_reference > { 118 friend class VectorMap; 115 119 const_value_type data; 116 120 … … 177 181 return data.first == o.data.first && &data.second == &o.data.second; 178 182 } 179 183 180 184 bool operator!= (const const_iterator& that) const { return !(*this == that); } 181 185 … … 229 233 230 234 template<typename T> 231 typename VectorMap<T>::iterator operator+( 232 typename VectorMap<T>::difference_type i, 233 const typename VectorMap<T>::iterator& it) { 235 typename VectorMap<T>::iterator operator+ (typename VectorMap<T>::difference_type i, 236 const typename VectorMap<T>::iterator& it) { 234 237 return it + i; 235 238 } 236 239 237 240 template<typename T> 238 typename VectorMap<T>::const_iterator operator+( 239 typename VectorMap<T>::difference_type i, 240 const typename VectorMap<T>::const_iterator& it) { 241 typename VectorMap<T>::const_iterator operator+ (typename VectorMap<T>::difference_type i, 242 const typename VectorMap<T>::const_iterator& it) { 241 243 return it + i; 242 244 }
Note:
See TracChangeset
for help on using the changeset viewer.