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 committed Nov 11, 2020
1 parent 98acc5a commit 1ca4820
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 1ca4820

Please sign in to comment.