#578 closed defect (fixed)
DataWeight and DataWeightProxy do behave different
Reported by: | Peter | Owned by: | Peter |
---|---|---|---|
Priority: | major | Milestone: | yat 0.6 |
Component: | utility | Version: | trunk |
Keywords: | Cc: |
Description
Equality operator for DataWeight is implemented as
bool operator==(const DataWeight& lhs, const DataWeight& rhs) { return lhs.data() == rhs.data(); }
while DataWeightProxy is implemented as
template<typename DataIterator, typename WeightIterator> bool operator==(const DataWeightProxy<DataIterator, WeightIterator>& lhs, const DataWeightProxy<DataIterator, WeightIterator>& rhs) { return lhs.data()==rhs.data() && lhs.weight()==rhs.weight(); }
I suggest DataWeightProxy should be reimplemented, but is it even needed since we allow implicit conversion DataWeightProxy => DataWeight?
Change History (3)
comment:1 Changed 14 years ago by
Component: | test → utility |
---|---|
Milestone: | yat 0.x+ → yat 0.6 |
Owner: | changed from Jari Häkkinen to Peter |
Status: | new → assigned |
comment:2 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note: See
TracTickets for help on using
tickets.
(In [2122]) 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