[#mp_units-named_unit-07]
= xref:mp_units.adoc[mp&lowbar;units]::xref:mp_units/named_unit-0ec.adoc[named&lowbar;unit]&lt;Symbol, U&gt;
:relfileprefix: ../
:mrdocs:

Specialization for unit of a specified base quantity

== Synopsis

Declared in `&lt;mp&hyphen;units&sol;framework&sol;unit&lowbar;definitions&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    xref:mp_units/symbol_text-032.adoc[symbol&lowbar;text] Symbol,
    xref:mp_units/Unit.adoc[Unit] auto QS&gt;
requires (!Symbol&period;empty()) &amp;&amp; detail&colon;&colon;is&lowbar;positive&lowbar;canonical&lowbar;unit&lowbar;mag&lt;U&gt;
struct xref:mp_units/named_unit-0ec.adoc[named&lowbar;unit]&lt;Symbol, U&gt;
    : &sol;&ast; implementation-defined &ast;&sol;
----

== Description

Associates a unit with a specified base quantity&period; For example `si&colon;&colon;metre` is a unit to measure `isq&colon;&colon;length` in the SI system&period;

[NOTE]
====
This is the preferred way to define a measurement unit for a specific base quantity&period;

====

[NOTE]
====
It does not have to (or sometimes even can&apos;t) be a proper system&apos;s base unit&period; For example a base unit of mass in the SI is `si&colon;&colon;kilogram` but here you are about to provide an `si&colon;&colon;gram` and it will work just fine as those two are convertible to each other&period; A similar case would be the `cgs&colon;&colon;centimetre` that is a base unit for `isq&colon;&colon;length` in the CGS system&period;

====

== Base Classes

[cols="1,4"]
|===
| Name| Description
| `&sol;&ast; implementation-defined &ast;&sol;`
| 
|===

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:mp_units/named_unit-07/_base_type_.adoc[`&lowbar;base&lowbar;type&lowbar;`] 
| Exposition&hyphen;only alias naming this specialization&apos;s base type&period;
|===


== Static Data Members

[cols="1,4"]
|===
| Name| Description
| xref:mp_units/named_unit-07/_quantity_spec_.adoc[`&lowbar;quantity&lowbar;spec&lowbar;`] 
| The base quantity measured by this unit
| xref:mp_units/named_unit-07/_symbol_.adoc[`&lowbar;symbol&lowbar;`] 
| Unique base unit identifier
|===


== Template Parameters

[cols="1,4"]
|===
| Name| Description
| *Symbol*
| a short text representation of the unit
| *QuantitySpec*
| a specification of a base quantity to be measured with this unit
| *Unit*
| a unit for which we provide a special name
|===


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