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
Sébastien Villemot 2024-01-05 18:33:24 +01:00
parent 2fd4a6fac4
commit cb7bd0778b
No known key found for this signature in database
GPG Key ID: 2CECE9350ECEBE4A
2 changed files with 0 additions and 38 deletions

View File

@ -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()
{

View File

@ -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)