mp_units::utility::operator+

Adds a safe_int to a floating-point value.

Synopsis

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

[[nodiscard]]
constexpr
auto
operator+(
    U lhs,
    safe_int rhs)
requires requires { lhs + static_cast<U>(rhs.value_); };

Return Value

the sum of lhs and the wrapped value

NOTE

The return value should not be discarded.

Template Parameters

NameDescription
Ua floating-point-like type (treat_as_floating_point<U> is true)

Parameters

NameDescription
lhsthe floating-point value
rhsthe safe_int to add