mp_units::QuantitySpecOf¶
A concept matching all quantity specifications of a provided property
Synopsis¶
Declared in <mp-units/framework/quantity_spec_concepts.h>
template<typename T, auto V>
concept QuantitySpecOf =
QuantitySpec<T> &&
((QuantitySpec<MP_UNITS_NTTP_HACK(decltype(V))> && mp_units::utility::implicitly_convertible(T{}, V)) ||
(detail::CharacterValue<V> && detail::overlaps(T::_character_.order, detail::axis_mask<V>().order) &&
detail::overlaps(T::_character_.field, detail::axis_mask<V>().field)));
Description¶
V may be another quantity specification, in which case this is satisfied by every specification implicitly convertible to it, or a character (a bare quantity_tensor_order, a bare quantity_field, or a full quantity_character), in which case it is satisfied by every specification that admits that character. A quantity kind admits every character. As in QuantityOf, the type of V selects the reading.
Ask this where no quantity exists yet to ask QuantityOf about, such as constraining a reference taken as a template parameter (utility::polar_vector requires a radius whose specification admits scalar).