mp_units::unit_symbol_separator¶
Selects what separates the multiplied units of a unit symbol
Synopsis¶
Declared in <mp-units/framework/unit_symbol_formatting.h>
enum class unit_symbol_separator : int;
Description¶
The default is a space. A typeset document may select a half-high dot instead:
constexpr std::string_view text_unit = unit_symbol(kg * m2 / s2); // "kg m²/s²"
constexpr std::string_view dot_unit =
unit_symbol<{.separator = unit_symbol_separator::half_high_dot}>(kg * m2 / s2);
Here dot_unit is kg⋅m²/s². The s and d tokens of a format specification select space and half_high_dot.
Members¶
| Name | Description |
|---|---|
space | A space, as in kg m²/s² |
half_high_dot | A half-high dot, as in kg⋅m²/s², valid only with unicode, and an error with basic |
default_separator [deprecated] | The former default, space |
See Also¶
character_setfor the choice between Unicode and the basic character setunit_symbol_solidusfor when a solidus dividesunit_symbol_formattingfor all the optionsunit_symboltakes- Text Output in the User's Guide