diff options
Diffstat (limited to 'llvm/include/llvm/ADT/CoalescingBitVector.h')
-rw-r--r-- | llvm/include/llvm/ADT/CoalescingBitVector.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/llvm/include/llvm/ADT/CoalescingBitVector.h b/llvm/include/llvm/ADT/CoalescingBitVector.h index 0a7dcfe22631..18803ecf209f 100644 --- a/llvm/include/llvm/ADT/CoalescingBitVector.h +++ b/llvm/include/llvm/ADT/CoalescingBitVector.h @@ -231,10 +231,17 @@ public: bool operator!=(const ThisT &RHS) const { return !operator==(RHS); } - class const_iterator - : public std::iterator<std::forward_iterator_tag, IndexT> { + class const_iterator { friend class CoalescingBitVector; + public: + using iterator_category = std::forward_iterator_tag; + using value_type = IndexT; + using difference_type = std::ptrdiff_t; + using pointer = value_type *; + using reference = value_type &; + + private: // For performance reasons, make the offset at the end different than the // one used in \ref begin, to optimize the common `It == end()` pattern. static constexpr unsigned kIteratorAtTheEndOffset = ~0u; |