Skip to content

mp_units::named_constant<Symbol, U>

Named constant definition

Synopsis

Declared in <mp-units/framework/unit_definitions.h>

template<symbol_text Symbol, Unit auto U>
  requires(!Symbol.empty())
struct named_constant<Symbol, U> : ::_base_type_

Description

It is very similar to named_unit but:

  • allows negative exponents in the unit definition (TODO )
  • does not allow the constant to be associated with a quantity_spec
  • does not allow the constant to be prefixed

Base Classes

NameDescription
::_base_type_

Type Aliases

Static Data Members

NameDescription
_symbol_ Unique constant identifier

Template Parameters

NameDescription
Symbola short text representation of the constant
Unita unit that we use to define a constant