From: Douglas Gregor Date: Thu, 21 Jul 2011 16:35:41 +0000 (+0000) Subject: Add the remaining RandomAccessIterator operations to X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=67029567f7d39d9356fbc505fffc2c1e21bf06ce;p=clang Add the remaining RandomAccessIterator operations to PreprocessingRecord::iterator. Where's concept_map when I need it? git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135679 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Lex/PreprocessingRecord.h b/include/clang/Lex/PreprocessingRecord.h index 22a51665b4..22ac57152f 100644 --- a/include/clang/Lex/PreprocessingRecord.h +++ b/include/clang/Lex/PreprocessingRecord.h @@ -376,14 +376,26 @@ namespace clang { return X.Position == Y.Position; } + friend bool operator!=(const iterator &X, const iterator &Y) { + return X.Position != Y.Position; + } + friend bool operator<(const iterator &X, const iterator &Y) { return X.Position < Y.Position; } - friend bool operator!=(const iterator &X, const iterator &Y) { - return X.Position != Y.Position; + friend bool operator>(const iterator &X, const iterator &Y) { + return X.Position > Y.Position; + } + + friend bool operator<=(const iterator &X, const iterator &Y) { + return X.Position < Y.Position; } + friend bool 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;