mp_units::quantity::quantity

Deleted overload that rejects truncating conversions of the numerical value.

Synopsis

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

template<
    typename Value,
    Reference R2>
requires (equivalent(unit, get_unit(R2{}))) && (!detail::RepConstructibleFrom<rep, Value>)
constexpr
quantity(
    Value val,
    R2 ref) = delete;

Parameters

NameDescription
valthe numerical value that would be truncated when converted to rep
refa reference whose unit is equivalent to unit