C++20 modernization: remove trivial != operator definitions

Those are no longer needed thanks to expression rewriting.
dprior
Sébastien Villemot 2024-01-05 18:12:32 +01:00
parent 3ab9be71c8
commit 2bfa311636
No known key found for this signature in database
GPG Key ID: 2CECE9350ECEBE4A
8 changed files with 7 additions and 49 deletions

View File

@ -1,6 +1,6 @@
/*
* Copyright © 2004-2011 Ondra Kamenik
* Copyright © 2019-2023 Dynare Team
* Copyright © 2019-2024 Dynare Team
*
* This file is part of Dynare.
*
@ -245,11 +245,6 @@ public:
{
return ptr == it.ptr;
}
bool
operator!=(const _Self& it) const
{
return ptr != it.ptr;
}
_TRef
operator*() const
{

View File

@ -1,6 +1,6 @@
/*
* Copyright © 2004-2011 Ondra Kamenik
* Copyright © 2019-2023 Dynare Team
* Copyright © 2019-2024 Dynare Team
*
* This file is part of Dynare.
*
@ -120,12 +120,6 @@ 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
{

View File

@ -1,6 +1,6 @@
/*
* Copyright © 2004-2011 Ondra Kamenik
* Copyright © 2019-2023 Dynare Team
* Copyright © 2019-2024 Dynare Team
*
* This file is part of Dynare.
*
@ -110,7 +110,6 @@ public:
// Exact equality.
bool operator==(const Vector& y) const;
bool operator!=(const Vector& y) const;
// Lexicographic ordering.
bool operator<(const Vector& y) const;
bool operator<=(const Vector& y) const;
@ -220,11 +219,6 @@ public:
}
// Exact equality
bool operator==(const ConstVector& y) const;
bool
operator!=(const ConstVector& y) const
{
return !operator==(y);
}
// Lexicographic ordering
bool operator<(const ConstVector& y) const;
bool

View File

@ -1,6 +1,6 @@
/*
* Copyright © 2004 Ondra Kamenik
* Copyright © 2019-2023 Dynare Team
* Copyright © 2019-2024 Dynare Team
*
* This file is part of Dynare.
*
@ -121,11 +121,6 @@ public:
Equivalence(const Equivalence& e, int i1, int i2);
bool operator==(const Equivalence& e) const;
bool
operator!=(const Equivalence& e) const
{
return !operator==(e);
}
[[nodiscard]] int
getN() const
{

View File

@ -1,6 +1,6 @@
/*
* Copyright © 2004 Ondra Kamenik
* Copyright © 2019-2023 Dynare Team
* Copyright © 2019-2024 Dynare Team
*
* This file is part of Dynare.
*
@ -81,11 +81,6 @@ public:
{
return nvs == td.nvs && sym == td.sym;
}
bool
operator!=(const TensorDimens& td) const
{
return !operator==(td);
}
[[nodiscard]] int
dimen() const

View File

@ -1,6 +1,6 @@
/*
* Copyright © 2004 Ondra Kamenik
* Copyright © 2019-2023 Dynare Team
* Copyright © 2019-2024 Dynare Team
*
* This file is part of Dynare.
*
@ -120,11 +120,6 @@ public:
delete[] data;
}
bool operator==(const IntSequence& s) const;
bool
operator!=(const IntSequence& s) const
{
return !operator==(s);
}
int&
operator[](int i)
{

View File

@ -131,11 +131,6 @@ public:
{
return dim == it.dim && run == it.run;
}
bool
operator!=(const symiterator& it)
{
return !operator==(it);
}
};
/* The class SymmetrySet defines a set of symmetries of the given length

View File

@ -1,6 +1,6 @@
/*
* Copyright © 2004 Ondra Kamenik
* Copyright © 2019-2023 Dynare Team
* Copyright © 2019-2024 Dynare Team
*
* This file is part of Dynare.
*
@ -155,11 +155,6 @@ public:
{
return offset == n.offset;
}
bool
operator!=(const index& n) const
{
return offset != n.offset;
}
[[nodiscard]] const IntSequence&
getCoor() const
{