mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-04 20:54:28 +02:00
refactor: degree Celsius and Fahrenheit symbols text now use Unicode codepoints
This commit is contained in:
@@ -39,7 +39,7 @@ using enum unit_symbol_separator;
|
||||
static_assert(unit_symbol(metre) == "m");
|
||||
static_assert(unit_symbol(second) == "s");
|
||||
static_assert(unit_symbol(joule) == "J");
|
||||
static_assert(unit_symbol(degree_Celsius) == "\u00B0C");
|
||||
static_assert(unit_symbol(degree_Celsius) == "\u2103");
|
||||
static_assert(unit_symbol<unit_symbol_formatting{.encoding = ascii}>(degree_Celsius) == "`C");
|
||||
static_assert(unit_symbol(kilogram) == "kg");
|
||||
static_assert(unit_symbol(hour) == "h");
|
||||
|
@@ -66,7 +66,7 @@ inline constexpr struct newton_ final : named_unit<"N", kilogram * metre / squar
|
||||
inline constexpr struct pascal_ final : named_unit<"Pa", newton / square(metre)> {} pascal;
|
||||
inline constexpr struct joule_ final : named_unit<"J", newton * metre> {} joule;
|
||||
inline constexpr struct watt_ final : named_unit<"W", joule / second> {} watt;
|
||||
inline constexpr struct degree_Celsius_ final : named_unit<symbol_text{u8"°C", "`C"}, kelvin> {} degree_Celsius;
|
||||
inline constexpr struct degree_Celsius_ final : named_unit<symbol_text{u8"℃", "`C"}, kelvin> {} degree_Celsius;
|
||||
|
||||
inline constexpr struct minute_ final : named_unit<"min", mag<60> * second> {} minute;
|
||||
inline constexpr struct hour_ final : named_unit<"h", mag<60> * minute> {} hour;
|
||||
|
Reference in New Issue
Block a user