[#mp_units-utility-operator_slash-02] = xref:mp_units.adoc[mp_units]::xref:mp_units/utility.adoc[utility]::operator/ :relfileprefix: ../../ :mrdocs: Divides an integral scalar by a `safe_int`, checking for overflow. == Synopsis Declared in `<mp‐units/utility/safe_int.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- [[nodiscard]] constexpr xref:mp_units/utility/safe_int-07.adoc[safe_int</* implementation-defined */, ErrorPolicy>] operator/( U lhs, xref:mp_units/utility/safe_int-07.adoc[safe_int] rhs); ---- == Return Value the quotient, as a `safe_int` of the promoted result type; triggers `ErrorPolicy::on_overflow` on overflow [NOTE] ==== The return value https://en.cppreference.com/cpp/language/attributes/nodiscard[should not be discarded^]. ==== == Template Parameters [cols="1,4"] |=== | Name| Description | *U* | the integral scalar type |=== == Parameters [cols="1,4"] |=== | Name| Description | *lhs* | the integral scalar operand | *rhs* | the `safe_int` to divide by |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#