mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-12 03:32:10 +00:00
Add operator= for type iterators to make them assignable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9083 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
814f622526
commit
ba7beb084c
@ -250,6 +250,12 @@ private:
|
|||||||
public:
|
public:
|
||||||
TypeIterator(const Type *ty, unsigned idx) : Ty(ty), Idx(idx) {}
|
TypeIterator(const Type *ty, unsigned idx) : Ty(ty), Idx(idx) {}
|
||||||
~TypeIterator() {}
|
~TypeIterator() {}
|
||||||
|
|
||||||
|
const _Self &operator=(const _Self &RHS) {
|
||||||
|
assert(Ty == RHS.Ty && "Cannot assign from different types!");
|
||||||
|
Idx = RHS.Idx;
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
bool operator==(const _Self& x) const { return Idx == x.Idx; }
|
bool operator==(const _Self& x) const { return Idx == x.Idx; }
|
||||||
bool operator!=(const _Self& x) const { return !operator==(x); }
|
bool operator!=(const _Self& x) const { return !operator==(x); }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user