r278156 - [ADT] Change iterator_adaptor_base's default template arguments to forward more underlying typedefs
Tim Shen via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 9 13:22:55 PDT 2016
Author: timshen
Date: Tue Aug 9 15:22:55 2016
New Revision: 278156
URL: http://llvm.org/viewvc/llvm-project?rev=278156&view=rev
Log:
[ADT] Change iterator_adaptor_base's default template arguments to forward more underlying typedefs
Summary:
The corresponding LLVM change: D23217.
LazyVector::iterator breaks, because int isn't an iterator type.
Since iterator_adaptor_base shouldn't be blamed to break at the call to
iterator_traits<int>::xxx, I'd rather "fix" LazyVector::iterator.
The perfect solution is to model "relative pointer", but it's beyond the goal of this patch.
Reviewers: chandlerc, bkramer
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D23218
Modified:
cfe/trunk/include/clang/AST/ExternalASTSource.h
Modified: cfe/trunk/include/clang/AST/ExternalASTSource.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/ExternalASTSource.h?rev=278156&r1=278155&r2=278156&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/ExternalASTSource.h (original)
+++ cfe/trunk/include/clang/AST/ExternalASTSource.h Tue Aug 9 15:22:55 2016
@@ -503,8 +503,9 @@ public:
/// We define this as a wrapping iterator around an int. The
/// iterator_adaptor_base class forwards the iterator methods to basic integer
/// arithmetic.
- class iterator : public llvm::iterator_adaptor_base<
- iterator, int, std::random_access_iterator_tag, T, int> {
+ class iterator
+ : public llvm::iterator_adaptor_base<
+ iterator, int, std::random_access_iterator_tag, T, int, T *, T &> {
LazyVector *Self;
iterator(LazyVector *Self, int Position)
More information about the cfe-commits
mailing list