[#mp_units-unit_for] = xref:mp_units.adoc[mp_units]::unit_for :relfileprefix: ../ :mrdocs: Public helper that yields the unit associated with a quantity‐like type. == Synopsis Declared in `<mp‐units/framework/quantity_traits.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<typename T> constexpr auto unit_for = detail::unit_for_impl<T>::value; ---- == Description Derived from the type's own `::unit` member (for `quantity` / `quantity_point`) or from `quantity_like_traits<T>` / `quantity_point_like_traits<T>` for external types. This is *not* a customization point. Users teach the library about external types by specializing `quantity_like_traits` / `quantity_point_like_traits`, not this helper. == Template Parameters [cols="1,4"] |=== |Name|Description | *T* | a quantity‐like or quantity‐point‐like type |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#