mirror of
https://github.com/zeek/zeek.git
synced 2025-10-10 02:28:21 +00:00
GH-1546: Make DictIterator() public, add copy/move operators
This commit is contained in:
parent
31f73f6e92
commit
6ab317f7bd
2 changed files with 90 additions and 3 deletions
|
@ -159,8 +159,14 @@ public:
|
|||
using difference_type = std::ptrdiff_t;
|
||||
using iterator_category = std::forward_iterator_tag;
|
||||
|
||||
DictIterator() = default;
|
||||
~DictIterator();
|
||||
|
||||
DictIterator(const DictIterator& that);
|
||||
DictIterator& operator=(const DictIterator& that);
|
||||
DictIterator(DictIterator&& that);
|
||||
DictIterator& operator=(DictIterator&& that);
|
||||
|
||||
reference operator*() { return *curr; }
|
||||
pointer operator->() { return curr; }
|
||||
|
||||
|
@ -173,7 +179,6 @@ public:
|
|||
private:
|
||||
friend class Dictionary;
|
||||
|
||||
DictIterator() = default;
|
||||
DictIterator(const Dictionary* d, detail::DictEntry* begin, detail::DictEntry* end);
|
||||
|
||||
Dictionary* dict = nullptr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue