Lines Matching defs:operator

50   DerivedT operator+(DifferenceTypeT n) const {
53 "The '+' operator is only defined for random access iterators.");
58 friend DerivedT operator+(DifferenceTypeT n, const DerivedT &i) {
61 "The '+' operator is only defined for random access iterators.");
64 DerivedT operator-(DifferenceTypeT n) const {
67 "The '-' operator is only defined for random access iterators.");
73 DerivedT &operator++() {
74 return static_cast<DerivedT *>(this)->operator+=(1);
76 DerivedT operator++(int) {
81 DerivedT &operator--() {
84 "The decrement operator is only defined for bidirectional iterators.");
85 return static_cast<DerivedT *>(this)->operator-=(1);
87 DerivedT operator--(int) {
90 "The decrement operator is only defined for bidirectional iterators.");
96 bool operator!=(const DerivedT &RHS) const {
97 return !static_cast<const DerivedT *>(this)->operator==(RHS);
100 bool operator>(const DerivedT &RHS) const {
104 return !static_cast<const DerivedT *>(this)->operator<(RHS) &&
105 !static_cast<const DerivedT *>(this)->operator==(RHS);
107 bool operator<=(const DerivedT &RHS) const {
111 return !static_cast<const DerivedT *>(this)->operator>(RHS);
113 bool operator>=(const DerivedT &RHS) const {
117 return !static_cast<const DerivedT *>(this)->operator<(RHS);
120 PointerT operator->() const {
121 return &static_cast<const DerivedT *>(this)->operator*();
123 ReferenceT operator[](DifferenceTypeT n) const {
126 return *static_cast<const DerivedT *>(this)->operator+(n);
134 /// operator* implementation. Other methods can be overridden as well.
168 DerivedT &operator+=(difference_type n) {
171 "The '+=' operator is only defined for random access iterators.");
175 DerivedT &operator-=(difference_type n) {
178 "The '-=' operator is only defined for random access iterators.");
182 using BaseT::operator-;
183 difference_type operator-(const DerivedT &RHS) const {
186 "The '-' operator is only defined for random access iterators.");
192 using BaseT::operator++;
193 DerivedT &operator++() {
197 using BaseT::operator--;
198 DerivedT &operator--() {
201 "The decrement operator is only defined for bidirectional iterators.");
206 bool operator==(const DerivedT &RHS) const { return I == RHS.I; }
207 bool operator<(const DerivedT &RHS) const {
214 ReferenceT operator*() const { return *I; }
239 T &operator*() const { return **this->I; }