Equality operators
Declared in <mp-units/utility/safe_int.h>
Checks whether a safe_int and a constrained value are equal
[[nodiscard]]
constexpr
bool
operator==(
safe_int lhs,
constrained<U, CP> const& rhs);
» more...
Checks whether a safe_int equals a floating-point value.
[[nodiscard]]
constexpr
bool
operator==(
safe_int lhs,
U rhs);
» more...
Checks whether a safe_int equals an integral scalar, comparing safely across signedness.
[[nodiscard]]
constexpr
bool
operator==(
safe_int lhs,
U rhs);
» more...
Checks whether two safe_int values wrap equal underlying values.
[[nodiscard]]
constexpr
bool
operator==(
safe_int lhs,
safe_int rhs) noexcept;
» more...
true if the underlying values are equaltrue if the wrapped value equals rhstrue if the wrapped values are equalThe return value should not be discarded.
| Name | Description |
|---|---|
| U | a floating-point-like type (treat_as_floating_point<U> is true) |
| Name | Description |
|---|---|
| lhs | the safe_int to compare |
| rhs | the constrained value to compare against |