Skip to content

Commit c5457e1

Browse files
Andrewjbeder
authored andcommitted
Make YAML::detail::iterator_base comparison operators const (#472)
1 parent bedb28f commit c5457e1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

include/yaml-cpp/node/detail/iterator.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,12 @@ class iterator_base : public std::iterator<std::forward_iterator_tag, V,
6161
}
6262

6363
template <typename W>
64-
bool operator==(const iterator_base<W>& rhs) {
64+
bool operator==(const iterator_base<W>& rhs) const {
6565
return m_iterator == rhs.m_iterator;
6666
}
6767

6868
template <typename W>
69-
bool operator!=(const iterator_base<W>& rhs) {
69+
bool operator!=(const iterator_base<W>& rhs) const {
7070
return m_iterator != rhs.m_iterator;
7171
}
7272

0 commit comments

Comments
 (0)