Compares two safe_int values by their wrapped underlying values.

Synopsis

Declared in <mp‐units/utility/safe_int.h>

[[nodiscard]]
constexpr
std::strong_ordering
operator<=>(
    safe_int lhs,
    safe_int rhs) noexcept;
Note

This function is a hidden friend of safe_int, declared only inside that class: it can be found only through argument-dependent lookup.

Return Value

the ordering of the wrapped values

Note

The return value should not be discarded.

Parameters

Name

Description

lhs

the first value to compare

rhs

the second value to compare

Created with MrDocs