1 #ifndef _theplu_yat_utility_range_
2 #define _theplu_yat_utility_range_
59 Range(T first, T last);
101 template<
typename T1,
typename T2>
111 template<
typename T1,
typename T2>
125 template<
typename T1,
typename T2>
126 bool operator<(const Range<T1>& lhs,
const Range<T2>& rhs);
135 template<
typename T1,
typename T2>
136 bool operator<=(const Range<T1>& lhs,
const Range<T2>& rhs);
145 template<
typename T1,
typename T2>
155 template<
typename T1,
typename T2>
165 : first_(first), last_(last)
181 first_ = rhs.
begin();
187 template<
typename T1,
typename T2>
192 T1 first1(lhs.
begin());
194 T2 first2(rhs.
begin());
196 while (first1 != last1 && first2 != last2) {
197 if (*first1 != *first2)
203 return first1==last1 && first2==last2;
207 template<
typename T1,
typename T2>
214 template<
typename T1,
typename T2>
215 bool operator<(const Range<T1>& lhs,
const Range<T2>& rhs)
217 return std::lexicographical_compare(lhs.begin(), lhs.end(),
218 rhs.begin(), rhs.end());
222 template<
typename T1,
typename T2>
229 template<
typename T1,
typename T2>
230 bool operator<=(const Range<T1>& lhs,
const Range<T2>& rhs)
236 template<
typename T1,
typename T2>