From: Douglas Gregor Date: Thu, 21 Jul 2011 16:37:44 +0000 (+0000) Subject: One last RandomAccessIterator operator for PreprocessingRecord::iterator X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1a23f12e1e283384b76e768a83f01bfcbbd61ca0;p=clang One last RandomAccessIterator operator for PreprocessingRecord::iterator git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135680 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Lex/PreprocessingRecord.h b/include/clang/Lex/PreprocessingRecord.h index 22ac57152f..f454ca96ca 100644 --- a/include/clang/Lex/PreprocessingRecord.h +++ b/include/clang/Lex/PreprocessingRecord.h @@ -419,6 +419,11 @@ namespace clang { friend difference_type operator-(const iterator &X, const iterator &Y) { return X.Position - Y.Position; } + + friend iterator operator-(iterator X, difference_type D) { + X.Position -= D; + return X; + } }; friend class iterator;