diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2014-04-24 06:59:50 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2014-04-24 06:59:50 +0000 |
commit | 3c1f8e0054d0f3b0614565388b0f7e2fd65ea60f (patch) | |
tree | dbc539a290515e532a8fc6322eb407ed5a31b750 /include | |
parent | e703fcb9757820fe27d9ef98ce3775d9c6d6e898 (diff) | |
download | llvm-3c1f8e0054d0f3b0614565388b0f7e2fd65ea60f.tar.gz llvm-3c1f8e0054d0f3b0614565388b0f7e2fd65ea60f.tar.bz2 llvm-3c1f8e0054d0f3b0614565388b0f7e2fd65ea60f.tar.xz |
[ADT] Attempt to appease another MSVC oddity by moving the injected
class name usage into a context we can put typename on it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207084 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/ADT/iterator.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/llvm/ADT/iterator.h b/include/llvm/ADT/iterator.h index e64ae9abb9..b1d29a8862 100644 --- a/include/llvm/ADT/iterator.h +++ b/include/llvm/ADT/iterator.h @@ -104,6 +104,8 @@ class iterator_adaptor_base : public iterator_facade_base< DerivedT, typename WrappedTraitsT::iterator_category, T, typename WrappedTraitsT::difference_type, PointerT, ReferenceT> { + typedef typename iterator_adaptor_base::iterator_facade_base BaseT; + protected: WrappedIteratorT I; @@ -130,17 +132,17 @@ public: I -= n; return *static_cast<DerivedT *>(this); } - using iterator_adaptor_base::iterator_facade_base::operator-; + using BaseT::operator-; difference_type operator-(const DerivedT &RHS) const { return I - RHS.I; } // We have to explicitly provide ++ and -- rather than letting the facade // forward to += because WrappedIteratorT might not support +=. - using iterator_adaptor_base::iterator_facade_base::operator++; + using BaseT::operator++; DerivedT &operator++() { ++I; return *static_cast<DerivedT *>(this); } - using iterator_adaptor_base::iterator_facade_base::operator--; + using BaseT::operator--; DerivedT &operator--() { --I; return *static_cast<DerivedT *>(this); |