[#mp_units-vector_components]
= xref:mp_units.adoc[mp&lowbar;units]::vector&lowbar;components
:relfileprefix: ../
:mrdocs:

Opts a vector quantity into decomposition into named 1D&hyphen;vector components

== Synopsis

Declared in `&lt;mp&hyphen;units&sol;framework&sol;customization&lowbar;points&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;xref:mp_units/QuantitySpec.adoc[QuantitySpec] auto QS&gt;
requires (get&lowbar;character(QS)&period;order &equals;&equals; quantity&lowbar;tensor&lowbar;order&colon;&colon;vector) &amp;&amp;
          (!detail&colon;&colon;QuantityKindSpec&lt;MP&lowbar;UNITS&lowbar;REMOVE&lowbar;CONST(decltype(QS))&gt;)
struct vector&lowbar;components;
----

== Description

Specialize for a vector `quantity&lowbar;spec` and inherit from `vector&lowbar;axes,` listing the per&hyphen;axis quantity specs in coordinate order (see `mp&hyphen;units&sol;framework&sol;vector&lowbar;components&period;h)`

[,cpp]
----
template<>
struct mp_units::vector_components<flight_velocity> :
    mp_units::vector_axes<forward_velocity, wind_drift, sink_rate> {};
----
Left undefined (the quantity is not decomposable) unless specialized&period; Only a concrete vector quantity spec may be decomposed, so a specialization for a non&hyphen;vector spec or for a `kind&lowbar;of&lt;&gt;` quantity kind is ill&hyphen;formed&period;

== Template Parameters

[cols="1,4"]
|===
| Name| Description
| *QS*
| the vector quantity spec being decomposed
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
