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

Synopsis

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

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

Return Value

true if from is explicitly convertible to to

Note

The return value should not be discarded.

Template Parameters

Name

Description

From

source quantity specification type

To

target quantity specification type

Parameters

Name

Description

from

source quantity specification value

to

target quantity specification value

Created with MrDocs