mp_units::implicitly_convertible

Checks whether a quantity of quantity spec From can be implicitly converted to quantity spec To

Synopsis

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

template<
    QuantitySpec From,
    QuantitySpec To>
[[nodiscard]]
consteval
bool
implicitly_convertible(
    From from,
    To to);

Return Value

true if from is implicitly convertible to to

NOTE

The return value should not be discarded.

Template Parameters

NameDescription
Fromsource quantity specification type
Totarget quantity specification type

Parameters

NameDescription
fromsource quantity specification value
totarget quantity specification value