Skip to content

mp_units::component_vectors

Opts a vector quantity into decomposition into named component vectors

Synopsis

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

template<QuantitySpec auto QS>
  requires(detail::admits(QS._character_.order, quantity_tensor_order::vector)) &&
          (!detail::QuantityKindSpec<MP_UNITS_NTTP_HACK(decltype(QS))>)
struct component_vectors;

Description

Specialize for a vector quantity_spec and inherit from vector_axes, listing the per-axis quantity specs in coordinate order (see mp-units/framework/vector_components.h)


template<>
struct mp_units::component_vectors<flight_velocity> :
    mp_units::vector_axes<forward_velocity, wind_drift, sink_rate> {};

The name follows ISO 80000-2, which calls the vectors a1e1, a2e2, and a3e3 the component vectors of a vector a = a1e1 + a2e2 + a3e3, and a1, a2, and a3 its coordinates.

Left undefined (the quantity is not decomposable) unless specialized. Only a concrete vector quantity spec may be decomposed, so a specialization for a non-vector spec or for a kind_of<> quantity kind is ill-formed.

Template Parameters

NameDescription
QSthe vector quantity spec being decomposed