Skip to content

Commit 9c1932b

Browse files
committed
[io] ROOT::Detail::TKeyMapIterable: return ref in operator++()
Also make the iterator an input_iterator rather than forward_iterator, since it does not satisfy all forward iterator requirements (in particular "f i and j are both dereferenceable, then i == j if and only if *i and *j are bound to the same object.")
1 parent b556baf commit 9c1932b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

io/io/inc/TFile.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,15 +101,15 @@ class TKeyMapIterable {
101101

102102
public:
103103
using iterator = TIterator;
104-
using iterator_category = std::forward_iterator_tag;
104+
using iterator_category = std::input_iterator_tag;
105105
using difference_type = std::ptrdiff_t;
106106
using value_type = TKeyMapNode;
107107
using pointer = value_type *;
108108
using reference = value_type &;
109109

110110
TIterator(TFile *file, std::uint64_t addr);
111111

112-
iterator operator++()
112+
iterator &operator++()
113113
{
114114
Advance();
115115
return *this;

0 commit comments

Comments
 (0)