mp_units::dimension_symbol

Returns the textual symbol of a dimension as a std::basic_string_view.

Synopsis

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

template<
    dimension_symbol_formatting fmt = dimension_symbol_formatting{},
    typename CharT = char,
    Dimension D>
[[nodiscard]]
consteval
std::basic_string_view<CharT>
dimension_symbol(D d);

Return Value

a view of the dimension's symbol

NOTE

The return value should not be discarded.

Template Parameters

NameDescription
fmtthe formatting options to use
CharTthe character type of the returned symbol

Parameters

NameDescription
dthe dimension to render