Add an exact_equal operator to avoid warnings
This commit is contained in:
parent
e8c9e1a11f
commit
d749be578a
@ -79,6 +79,15 @@ bool
|
|||||||
almost_equal (const double &a, const double &b);
|
almost_equal (const double &a, const double &b);
|
||||||
|
|
||||||
|
|
||||||
|
// Useful for explictly ignore equality warnings
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wfloat-equal"
|
||||||
|
template <typename T>
|
||||||
|
bool
|
||||||
|
exact_equal (const T &a, const T &b)
|
||||||
|
{ return a == b; }
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
|
||||||
/// Variadic minimum
|
/// Variadic minimum
|
||||||
template <typename T>
|
template <typename T>
|
||||||
const T&
|
const T&
|
||||||
|
Loading…
Reference in New Issue
Block a user