From 1a23f12e1e283384b76e768a83f01bfcbbd61ca0 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Thu, 21 Jul 2011 16:37:44 +0000 Subject: [PATCH] One last RandomAccessIterator operator for PreprocessingRecord::iterator git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135680 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Lex/PreprocessingRecord.h | 5 +++++ 1 file changed, 5 insertions(+) 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; -- 2.40.0