@@ -56,7 +56,7 @@ class iterator_range :
5656 * Default constructor. Create empty iterator_range.
5757 */
5858 constexpr iterator_range () :
59- P( iterator{}, iterator{}) {
59+ P{ iterator{}, iterator{}} {
6060 }
6161
6262 /* *
@@ -66,8 +66,8 @@ class iterator_range :
6666 * @param last_iterator Iterator to end of range.
6767 */
6868 constexpr iterator_range (iterator&& first_iterator, iterator&& last_iterator) :
69- P( std::forward<iterator>(first_iterator),
70- std::forward<iterator>(last_iterator)) {
69+ P{ std::forward<iterator>(first_iterator),
70+ std::forward<iterator>(last_iterator)} {
7171 }
7272
7373 // / Return iterator to beginning of range.
@@ -164,6 +164,8 @@ class const_fixed_iterator {
164164
165165public:
166166
167+ // / @cond usual iterator functions not documented
168+
167169 using iterator_category = std::random_access_iterator_tag;
168170 using value_type = T;
169171 using difference_type = std::ptrdiff_t ;
@@ -173,7 +175,7 @@ class const_fixed_iterator {
173175 const_fixed_iterator () noexcept = default ;
174176
175177 explicit const_fixed_iterator (const char * data) noexcept :
176- m_data( data) {
178+ m_data{ data} {
177179 }
178180
179181 const_fixed_iterator (const const_fixed_iterator&) noexcept = default ;
@@ -204,14 +206,6 @@ class const_fixed_iterator {
204206 return tmp;
205207 }
206208
207- bool operator ==(const_fixed_iterator rhs) const noexcept {
208- return m_data == rhs.m_data ;
209- }
210-
211- bool operator !=(const_fixed_iterator rhs) const noexcept {
212- return !(*this == rhs);
213- }
214-
215209 const_fixed_iterator& operator --() noexcept {
216210 m_data -= sizeof (value_type);
217211 return *this ;
@@ -223,6 +217,14 @@ class const_fixed_iterator {
223217 return tmp;
224218 }
225219
220+ friend bool operator ==(const_fixed_iterator lhs, const_fixed_iterator rhs) noexcept {
221+ return lhs.m_data == rhs.m_data ;
222+ }
223+
224+ friend bool operator !=(const_fixed_iterator lhs, const_fixed_iterator rhs) noexcept {
225+ return !(lhs == rhs);
226+ }
227+
226228 friend bool operator <(const_fixed_iterator lhs, const_fixed_iterator rhs) noexcept {
227229 return lhs.m_data < rhs.m_data ;
228230 }
@@ -237,7 +239,6 @@ class const_fixed_iterator {
237239
238240 friend bool operator >=(const_fixed_iterator lhs, const_fixed_iterator rhs) noexcept {
239241 return !(lhs < rhs);
240-
241242 }
242243
243244 const_fixed_iterator& operator +=(difference_type val) noexcept {
@@ -276,6 +277,8 @@ class const_fixed_iterator {
276277 return *(*this + n);
277278 }
278279
280+ // / @endcond
281+
279282}; // class const_fixed_iterator
280283
281284/* *
@@ -295,6 +298,8 @@ class const_varint_iterator {
295298
296299public:
297300
301+ // / @cond usual iterator functions not documented
302+
298303 using iterator_category = std::forward_iterator_tag;
299304 using value_type = T;
300305 using difference_type = std::ptrdiff_t ;
@@ -318,8 +323,8 @@ class const_varint_iterator {
318323 const_varint_iterator () noexcept = default ;
319324
320325 const_varint_iterator (const char * data, const char * end) noexcept :
321- m_data ( data) ,
322- m_end ( end) {
326+ m_data{ data} ,
327+ m_end{ end} {
323328 }
324329
325330 const_varint_iterator (const const_varint_iterator&) noexcept = default ;
@@ -357,6 +362,8 @@ class const_varint_iterator {
357362 return !(*this == rhs);
358363 }
359364
365+ // / @endcond
366+
360367}; // class const_varint_iterator
361368
362369/* *
@@ -368,18 +375,20 @@ class const_svarint_iterator : public const_varint_iterator<T> {
368375
369376public:
370377
378+ // / @cond usual iterator functions not documented
379+
371380 using iterator_category = std::forward_iterator_tag;
372381 using value_type = T;
373382 using difference_type = std::ptrdiff_t ;
374383 using pointer = value_type*;
375384 using reference = value_type&;
376385
377386 const_svarint_iterator () noexcept :
378- const_varint_iterator<T>() {
387+ const_varint_iterator<T>{} {
379388 }
380389
381390 const_svarint_iterator (const char * data, const char * end) noexcept :
382- const_varint_iterator<T>( data, end) {
391+ const_varint_iterator<T>{ data, end} {
383392 }
384393
385394 const_svarint_iterator (const const_svarint_iterator&) = default ;
@@ -409,6 +418,8 @@ class const_svarint_iterator : public const_varint_iterator<T> {
409418 return tmp;
410419 }
411420
421+ // / @endcond
422+
412423}; // class const_svarint_iterator
413424
414425} // end namespace protozero
@@ -419,6 +430,8 @@ namespace std {
419430 // functions can't be partially specialized, we have to do this for
420431 // every value_type we are using.
421432
433+ // / @cond individual overloads do not need to be documented
434+
422435 template <>
423436 inline typename protozero::const_varint_iterator<int32_t >::difference_type
424437 distance<protozero::const_varint_iterator<int32_t >>(protozero::const_varint_iterator<int32_t > first, // NOLINT(readability-inconsistent-declaration-parameter-name)
@@ -461,6 +474,8 @@ namespace std {
461474 return protozero::const_svarint_iterator<int64_t >::distance (first, last);
462475 }
463476
477+ // / @endcond
478+
464479} // end namespace std
465480
466481#endif // PROTOZERO_ITERATORS_HPP
0 commit comments