Skip to content

mp_units::rounded_up

Rounding policy that rounds towards positive infinity

Synopsis

Declared in <mp-units/framework/rounding.h>

inline constexpr rounded_up_t rounded_up = rounded_up{};

Description

It has the semantics of std::chrono::ceil. A conversion to a floating-point representation type doesn't accept it.

quantity duration = (1.2345 * s).in<int>(ms, rounded_up);  // 1235 ms

See Also