Changeset 2122


Ignore:
Timestamp:
Dec 19, 2009, 3:30:55 PM (12 years ago)
Author:
Peter
Message:

Remove implementation of operator==(DataWeightProxy?, DataWeightProxy?)
and rather rely on implicit conversion to DataWeight? and its
operator. This implies the behavior changes but that change is needed
because the previous behavior was very unexpected.

closes #578

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/data_weight_proxy_test.cc

    r1538 r2122  
    22
    33/*
    4   Copyright (C) 2008 Peter Johansson
     4  Copyright (C) 2008, 2009 Peter Johansson
    55
    66  This file is part of the yat library, http://dev.thep.lu.se/yat
     
    7676    suite.add(false);
    7777  }
     78  if (holder() == holder())
     79    suite.add(true);
     80  else
     81    suite.add(false);
    7882  if (holder() != const_holder()) {
    7983    suite.add(false);
    8084  }
     85  if (holder() == const_holder())
     86    suite.add(true);
     87  else
     88    suite.add(false);
    8189
    8290  suite.err() << "testing assignment\n";
  • trunk/yat/utility/DataWeightProxy.h

    r2119 r2122  
    106106  };
    107107
    108  
    109   /**
    110      \brief equality operator
    111 
    112      \relates DataWeightProxy
    113    */
    114   template<typename DataIterator, typename WeightIterator>
    115   bool operator==(const DataWeightProxy<DataIterator, WeightIterator>& lhs,
    116                   const DataWeightProxy<DataIterator, WeightIterator>& rhs)
    117   {
    118     return lhs.data()==rhs.data() && lhs.weight()==rhs.weight();
    119   }
    120 
    121108}}} // of namespace utility, yat, and theplu
    122109
Note: See TracChangeset for help on using the changeset viewer.