- Timestamp:
- Jun 6, 2008, 9:00:46 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/yat/utility/Range.h
r1336 r1337 87 87 /** 88 88 \brief Equality comparison 89 \return true iff underlying std::type_infoare equal89 \return true iff underlying elements are equal 90 90 */ 91 91 template<typename T1, typename T2> … … 100 100 /** 101 101 \brief Ordering relation 102 \return true iff underlying lhs.get()<rhs.get() 102 103 Using std::lexicographical_compare 104 105 \return true if \a lhs < \a rhs 103 106 */ 104 107 template<typename T1, typename T2> … … 106 109 107 110 /** 108 \ brief Based on operators == and <109 */ 110 template<typename T1, typename T2> 111 bool operator<=(const Range<T1>& , const Range<T2>&);112 113 /** 114 \ brief Based on operators == and <111 \return ! (\a rhs < \a lhs ) 112 */ 113 template<typename T1, typename T2> 114 bool operator<=(const Range<T1>& lhs, const Range<T2>& rhs); 115 116 /** 117 \return \a rhs < \a lhs 115 118 */ 116 119 template<typename T1, typename T2> … … 118 121 119 122 /** 120 \ brief Based on operators == and <123 \return ! (\a lhs < \a rhs ) 121 124 */ 122 125 template<typename T1, typename T2> … … 155 158 bool operator==(const Range<T>& lhs, const Range<T>& rhs) 156 159 { 157 // we are not using std::equal in order to handle ranges of equal length 160 // we are not using std::equal because we want to handle ranges of 161 // different length 158 162 T first1(lhs.begin()); 159 163 T last1(lhs.end()); … … 166 170 ++first2; 167 171 } 172 // check that ranges are equally long 168 173 return first1==last1 && first2==last2; 169 174 }
Note: See TracChangeset
for help on using the changeset viewer.