C++20 modernization: drop comparison operators made obsolete by rewriting rules
The implicit conversion from Vector to ConstVector, in addition to the rewriting rules and ConstVector::operator<=>, ensure that those are no longer needed.dprior
parent
2fd4a6fac4
commit
cb7bd0778b
|
@ -114,36 +114,6 @@ Vector::Vector(mxArray* p) :
|
|||
throw SYLV_MES_EXCEPTION("This is not a dense array of real doubles.");
|
||||
}
|
||||
|
||||
bool
|
||||
Vector::operator==(const Vector& y) const
|
||||
{
|
||||
return ConstVector(*this) == y;
|
||||
}
|
||||
|
||||
bool
|
||||
Vector::operator<(const Vector& y) const
|
||||
{
|
||||
return ConstVector(*this) < y;
|
||||
}
|
||||
|
||||
bool
|
||||
Vector::operator<=(const Vector& y) const
|
||||
{
|
||||
return ConstVector(*this) <= y;
|
||||
}
|
||||
|
||||
bool
|
||||
Vector::operator>(const Vector& y) const
|
||||
{
|
||||
return ConstVector(*this) > y;
|
||||
}
|
||||
|
||||
bool
|
||||
Vector::operator>=(const Vector& y) const
|
||||
{
|
||||
return ConstVector(*this) >= y;
|
||||
}
|
||||
|
||||
void
|
||||
Vector::zeros()
|
||||
{
|
||||
|
|
|
@ -109,14 +109,6 @@ public:
|
|||
return s;
|
||||
}
|
||||
|
||||
// Exact equality.
|
||||
bool operator==(const Vector& y) const;
|
||||
// Lexicographic ordering.
|
||||
bool operator<(const Vector& y) const;
|
||||
bool operator<=(const Vector& y) const;
|
||||
bool operator>(const Vector& y) const;
|
||||
bool operator>=(const Vector& y) const;
|
||||
|
||||
virtual ~Vector()
|
||||
{
|
||||
if (destroy)
|
||||
|
|
Loading…
Reference in New Issue