[#mp_units-ceil-0e] = xref:mp_units.adoc[mp_units]::ceil :relfileprefix: ../ :mrdocs: Computes the smallest quantity point with integer representation and unit type To with its number not less than qp == Synopsis Declared in `<mp‐units/math.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< xref:mp_units/Unit.adoc[Unit] auto To, auto R, auto PO, typename Rep> [[nodiscard]] constexpr xref:mp_units/QuantityPointOf.adoc[QuantityPointOf<quantity_point<R, PO, Rep>::quantity_spec>] auto ceil(xref:mp_units/quantity_point-08.adoc[quantity_point<R, PO, Rep>] const& qp) noexcept requires requires { qp.force_in(To); } && ((treat_as_floating_point<Rep> && (requires(Rep v) { ceil(v); } #if MP_UNITS_HOSTED || requires(Rep v) { std::ceil(v); } #endif )) || (!treat_as_floating_point<Rep> && requires { representation_values<Rep>::one(); })); ---- == Return Value QuantityPoint The rounded quantity with unit type To [NOTE] ==== The return value https://en.cppreference.com/cpp/language/attributes/nodiscard[should not be discarded^]. ==== == Parameters [cols="1,4"] |=== | Name| Description | *qp* | Quantity point being the base of the operation |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#