[#mp_units-named_constant]
= xref:mp_units.adoc[mp&lowbar;units]::named&lowbar;constant
:relfileprefix: ../
:mrdocs:

Named constant definition

== Synopsis

Declared in `&lt;mp&hyphen;units&sol;framework&sol;unit&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 U&gt;
requires (!Symbol&period;empty())
struct named&lowbar;constant
    : ::&lowbar;base&lowbar;type&lowbar;
----

== Description

It is very similar to `named&lowbar;unit` but&colon;

* allows negative exponents in the unit definition (TODO )
* does not allow the constant to be associated with a `quantity&lowbar;spec`
* does not allow the constant to be prefixed

== Base Classes

[cols="1,4"]
|===
| Name| Description
| `::&lowbar;base&lowbar;type&lowbar;`
| 
|===

== Type Aliases

[cols="1"]
|===
| Name
| xref:mp_units/named_constant/_base_type_.adoc[`&lowbar;base&lowbar;type&lowbar;`] 
|===


== Static Data Members

[cols="1,4"]
|===
| Name| Description
| xref:mp_units/named_constant/_symbol_.adoc[`&lowbar;symbol&lowbar;`] 
| Unique constant identifier
|===


== Derived Classes

[cols="1,4"]
|===
| Name| Description
| xref:mp_units/pi-0c.adoc[`pi`] 
| 
|===

== Template Parameters

[cols="1,4"]
|===
| Name| Description
| *Symbol*
| a short text representation of the constant
| *Unit*
| a unit that we use to define a constant
|===


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