[llvm] r207084 - [ADT] Attempt to appease another MSVC oddity by moving the injected
Chandler Carruth
chandlerc at gmail.com
Wed Apr 23 23:59:50 PDT 2014
Author: chandlerc
Date: Thu Apr 24 01:59:50 2014
New Revision: 207084
URL: http://llvm.org/viewvc/llvm-project?rev=207084&view=rev
Log:
[ADT] Attempt to appease another MSVC oddity by moving the injected
class name usage into a context we can put typename on it.
Modified:
llvm/trunk/include/llvm/ADT/iterator.h
Modified: llvm/trunk/include/llvm/ADT/iterator.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/iterator.h?rev=207084&r1=207083&r2=207084&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/iterator.h (original)
+++ llvm/trunk/include/llvm/ADT/iterator.h Thu Apr 24 01:59:50 2014
@@ -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);
More information about the llvm-commits
mailing list