[#mp_units-base_dimension]
= xref:mp_units.adoc[mp&lowbar;units]::base&lowbar;dimension
:relfileprefix: ../
:mrdocs:

A dimension of a base quantity

== Synopsis

Declared in `&lt;mp&hyphen;units&sol;framework&sol;dimension&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;xref:mp_units/symbol_text-032.adoc[symbol&lowbar;text] Symbol&gt;
struct base&lowbar;dimension
    : &sol;&ast; implementation-defined &ast;&sol;
----

== Description

Base quantity is a quantity in a conventionally chosen subset of a given system of quantities, where no quantity in the subset can be expressed in terms of the other quantities within that subset&period; They are referred to as being mutually independent since a base quantity cannot be expressed as a product of powers of the other base quantities&period;

`Symbol` template parameter is an unique identifier of the base dimension&period; The same identifiers can be multiplied and divided which will result with an adjustment of its factor in an exponent of a `derived&lowbar;dimension` (in case of zero the dimension will be simplified and removed from further analysis of current expresion)&period;

User should derive a strong type from this class template rather than use it directly in the source code&period; For example&colon;

[,cpp]
----
{.cpp}
 inline constexpr struct dim_length final : base_dimension<"L"> {} dim_length;
 inline constexpr struct dim_time final : base_dimension<"T"> {} dim_time;
 inline constexpr struct dim_mass final : base_dimension<"M"> {} dim_mass;
----
[NOTE]
====
A common convention in this library is to assign the same name for a type and an object of this type&period; Besides defining them user never works with the dimension types in the source code&period; All operations are done on the objects&period; Contrarily, the dimension types are the only one visible in the compilation errors&period; Having them of the same names improves user experience and somehow blurs those separate domains&period;

====

== Base Classes

[cols="1,4"]
|===
|Name|Description

| `&sol;&ast; implementation-defined &ast;&sol;`
| 
|===

== Static Data Members

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

== Template Parameters

[cols="1,4"]
|===
|Name|Description

| *Symbol*
| an unique identifier of the base dimension used to provide dimensional analysis support
|===


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