mp_units::character_set¶
Selects the characters a unit or dimension symbol is printed with
Synopsis¶
Declared in <mp-units/framework/symbol_text.h>
enum class character_set : int;
Description¶
Every symbol has a Unicode spelling and a spelling in the basic character set of C++, which is a subset of ASCII:
// a log file parsed by scripts that expect plain ASCII
constexpr std::string_view log_unit = unit_symbol<{.char_set = character_set::basic}>(us); // "us"
constexpr std::string_view screen_unit = unit_symbol(us); // "µs"
The P token of a format specification selects basic too.
Members¶
| Name | Description |
|---|---|
unicode | Unicode, as in µs, m³ and L²MT⁻³ |
utf8 [deprecated] | The former name of unicode |
basic | The basic character set, as in us, m^3 and L^2MT^-3 |
portable [deprecated] | The former name of basic |
ascii [deprecated] | The former name of basic |
default_character_set [deprecated] | The former default, unicode |
default_encoding [deprecated] | The former default, unicode |
See Also¶
unit_symbol_formattingfor all the optionsunit_symboltakesdimension_symbol_formattingfor all the optionsdimension_symboltakes- Text Output in the User's Guide