Skip to content

Commit

Permalink
Fix reference types in iterators
Browse files Browse the repository at this point in the history
Amends 26faac3.
  • Loading branch information
orgads authored and jbeder committed Aug 27, 2024
1 parent 84459a7 commit 850ec4f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/yaml-cpp/node/detail/iterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class iterator_base {
using value_type = V;
using difference_type = std::ptrdiff_t;
using pointer = V*;
using reference = V;
using reference = V&;

public:
iterator_base() : m_iterator(), m_pMemory() {}
Expand Down
2 changes: 1 addition & 1 deletion include/yaml-cpp/node/detail/node_iterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class node_iterator_base {
using value_type = node_iterator_value<V>;
using difference_type = std::ptrdiff_t;
using pointer = node_iterator_value<V>*;
using reference = node_iterator_value<V>;
using reference = node_iterator_value<V>&;
using SeqIter = typename node_iterator_type<V>::seq;
using MapIter = typename node_iterator_type<V>::map;

Expand Down

0 comments on commit 850ec4f

Please sign in to comment.