Skip to content

mp_units::utility::operator%

Modulus operators

Synopses

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

Modulus operator

[[nodiscard]] constexpr safe_int</* implementation-defined */, ErrorPolicy> operator%(safe_int lhs, safe_int rhs);

» more...

Modulus operator

template<typename U>
  requires(detail::integral<U> && detail::same_sign_v<U, T>)
[[nodiscard]] constexpr safe_int</* implementation-defined */, ErrorPolicy> operator%(U lhs, safe_int rhs);

» more...

Modulus operator

template<typename U>
  requires(detail::integral<U> && detail::same_sign_v<T, U>)
[[nodiscard]] constexpr safe_int</* implementation-defined */, ErrorPolicy> operator%(safe_int lhs, U rhs);

» more...

Modulus operator

template<typename U, typename CP>
  requires detail::integral<U>
[[nodiscard]] constexpr safe_int</* implementation-defined */, ErrorPolicy> operator%(safe_int lhs,
                                                                                      constrained<U, CP> rhs);

» more...

Modulus operator

template<typename U, typename CP>
  requires detail::integral<U>
[[nodiscard]] constexpr safe_int</* implementation-defined */, ErrorPolicy> operator%(constrained<U, CP> lhs,
                                                                                      safe_int rhs);

» more...

Return Value

Note

The return value should not be discarded.