[#mp_units-prefixed_unit] = xref:mp_units.adoc[mp_units]::prefixed_unit :relfileprefix: ../ :mrdocs: A prefixed unit == Synopsis Declared in `<mp‐units/framework/unit.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< xref:mp_units/symbol_text-032.adoc[symbol_text] Symbol, xref:mp_units/UnitMagnitude.adoc[UnitMagnitude] auto M, xref:mp_units/PrefixableUnit.adoc[PrefixableUnit] auto U> requires (!Symbol.empty()) struct prefixed_unit : ::_base_type_ ---- == Base Classes [cols=2] |=== | Name | Description | `::_base_type_` | |=== == Types [cols=1] |=== | Name | xref:mp_units/prefixed_unit/_base_type_.adoc[`_base_type_`] |=== == Static Data Members [cols=1] |=== | Name | xref:mp_units/prefixed_unit/_symbol_.adoc[`_symbol_`] |=== == Description Defines a new unit that is a scaled version of another unit with the scaling factor specified by a predefined prefix. For example: [,cpp] ---- {.cpp} template struct kilo_ : prefixed_unit<"k", mag_power<10, 3>, U> {}; template constexpr kilo_ kilo; inline constexpr auto kilogram = si::kilo; ---- == Template Parameters [cols=2] |=== | Name | Description | *Symbol* | a prefix text to prepend to a unit symbol | *M* | scaling factor of the prefix | *U* | a named unit to be prefixed |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#