[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 llvm-svn: 278156
This commit is contained in:
parent
ffb60901fe
commit
0c74967186
|
@ -503,8 +503,9 @@ public:
|
||||||
/// We define this as a wrapping iterator around an int. The
|
/// We define this as a wrapping iterator around an int. The
|
||||||
/// iterator_adaptor_base class forwards the iterator methods to basic integer
|
/// iterator_adaptor_base class forwards the iterator methods to basic integer
|
||||||
/// arithmetic.
|
/// arithmetic.
|
||||||
class iterator : public llvm::iterator_adaptor_base<
|
class iterator
|
||||||
iterator, int, std::random_access_iterator_tag, T, int> {
|
: public llvm::iterator_adaptor_base<
|
||||||
|
iterator, int, std::random_access_iterator_tag, T, int, T *, T &> {
|
||||||
LazyVector *Self;
|
LazyVector *Self;
|
||||||
|
|
||||||
iterator(LazyVector *Self, int Position)
|
iterator(LazyVector *Self, int Position)
|
||||||
|
|
Loading…
Reference in New Issue