mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-08 21:32:39 +00:00
Add iterator_traits to ImmutableMap and ImmutableSet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175085 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7b0bc3fe3e
commit
3df02ac9d4
@ -224,6 +224,11 @@ public:
|
||||
iterator operator--(int) { iterator tmp(*this); --itr; return tmp; }
|
||||
bool operator==(const iterator& RHS) const { return RHS.itr == itr; }
|
||||
bool operator!=(const iterator& RHS) const { return RHS.itr != itr; }
|
||||
|
||||
typedef ImmutableMap<KeyT,ValT,ValInfo>::value_type value_type;
|
||||
typedef value_type *pointer;
|
||||
typedef value_type &reference;
|
||||
typedef std::bidirectional_iterator_tag iterator_category;
|
||||
};
|
||||
|
||||
iterator begin() const { return iterator(Root); }
|
||||
|
@ -1066,6 +1066,11 @@ public:
|
||||
inline bool operator==(const iterator& RHS) const { return RHS.itr == itr; }
|
||||
inline bool operator!=(const iterator& RHS) const { return RHS.itr != itr; }
|
||||
inline value_type *operator->() const { return &(operator*()); }
|
||||
|
||||
typedef ImmutableSet<ValT,ValInfo>::value_type value_type;
|
||||
typedef value_type *pointer;
|
||||
typedef value_type &reference;
|
||||
typedef std::bidirectional_iterator_tag iterator_category;
|
||||
};
|
||||
|
||||
iterator begin() const { return iterator(Root); }
|
||||
|
Loading…
x
Reference in New Issue
Block a user