Changeset 1340 for trunk/yat


Ignore:
Timestamp:
Jun 12, 2008, 8:51:53 PM (13 years ago)
Author:
Peter
Message:

fixing so declarations match implementations

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/utility/Range.h

    r1339 r1340  
    169169
    170170
    171   template<typename T>
    172   bool operator==(const Range<T>& lhs, const Range<T>& rhs)
     171  template<typename T1, typename T2>
     172  bool operator==(const Range<T1>& lhs, const Range<T2>& rhs)
    173173  {
    174174    // we are not using std::equal because we want to handle ranges of
    175175    // different length
    176     T first1(lhs.begin());
    177     T last1(lhs.end());
    178     T first2(rhs.begin());
    179     T last2(rhs.end());
     176    T1 first1(lhs.begin());
     177    T1 last1(lhs.end());
     178    T2 first2(rhs.begin());
     179    T2 last2(rhs.end());
    180180    while (first1 != last1 && first2 != last2) {
    181181      if (*first1 != *first2)
     
    189189
    190190
    191   template<typename T>
    192   bool operator!=(const Range<T>& lhs, const Range<T>& rhs)
     191  template<typename T1, typename T2>
     192  bool operator!=(const Range<T1>& lhs, const Range<T2>& rhs)
    193193  {
    194194    return ! (lhs==rhs);
     
    196196
    197197
    198   template<typename T>
    199   bool operator<(const Range<T>& lhs, const Range<T>& rhs)
     198  template<typename T1, typename T2>
     199  bool operator<(const Range<T1>& lhs, const Range<T2>& rhs)
    200200  {
    201201    return std::lexicographical_compare(lhs.begin(), lhs.end(),
     
    204204
    205205
    206   template<typename T>
    207   bool operator>(const Range<T>& lhs, const Range<T>& rhs)
     206  template<typename T1, typename T2>
     207  bool operator>(const Range<T1>& lhs, const Range<T2>& rhs)
    208208  {
    209209    return rhs < lhs;
     
    211211
    212212
    213   template<typename T>
    214   bool operator<=(const Range<T>& lhs, const Range<T>& rhs)
     213  template<typename T1, typename T2>
     214  bool operator<=(const Range<T1>& lhs, const Range<T2>& rhs)
    215215  {
    216216    return ! (rhs<lhs);
     
    218218
    219219
    220   template<typename T>
    221   bool operator>=(const Range<T>& lhs, const Range<T>& rhs)
     220  template<typename T1, typename T2>
     221  bool operator>=(const Range<T1>& lhs, const Range<T2>& rhs)
    222222  {
    223223    return ! (lhs<rhs);
Note: See TracChangeset for help on using the changeset viewer.