mp_units::unit_symbol_to

Writes the textual symbol of a unit to an output iterator

Synopsis

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

template<
    typename CharT = char,
    std::output_iterator<CharT> Out,
    Unit U>
constexpr
Out
unit_symbol_to(
    Out out,
    U u,
    unit_symbol_formatting const& fmt = unit_symbol_formatting{});

Return Value

an iterator past the last character written

Template Parameters

NameDescription
CharTthe character type used to represent the symbol

Parameters

NameDescription
outthe output iterator to write the symbol to
uthe unit to obtain the symbol of
fmtthe formatting options to use