[ADT] Attempt to appease another MSVC oddity by moving the injected
authorChandler Carruth <chandlerc@gmail.com>
Thu, 24 Apr 2014 06:59:50 +0000 (06:59 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Thu, 24 Apr 2014 06:59:50 +0000 (06:59 +0000)
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

include/llvm/ADT/iterator.h

index e64ae9abb9f071390574033a11a89b1a487b6325..b1d29a886230acde894f1da4da24e035a872a3ae 100644 (file)
@@ -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);