Skip to content

Commit

Permalink
iterator_traits<vehicle_part_iterator<T>> is missing reference (Cleve…
Browse files Browse the repository at this point in the history
…rRaven#58647)

* iterator_traits<vehicle_part_iterator<T>> is missing reference

* added comments
  • Loading branch information
SaumyaBhushan authored and tornikeo committed Jun 26, 2022
1 parent 1c31c9e commit 1c5b24f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/vpart_range.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ template<class T> struct iterator_traits<vehicle_part_iterator<T>> {
using value_type = vpart_reference;
// TODO: maybe change into random access iterator? This requires adding
// more operators to the iterator, which may not be efficient.
using reference = const vpart_reference &;
using pointer = const vpart_reference *;
using iterator_category = std::forward_iterator_tag;
};
} // namespace std
Expand Down

0 comments on commit 1c5b24f

Please sign in to comment.