diff --git a/docs/blog/posts/2.2.0-released.md b/docs/blog/posts/2.2.0-released.md index 7593ac99..95699623 100644 --- a/docs/blog/posts/2.2.0-released.md +++ b/docs/blog/posts/2.2.0-released.md @@ -165,6 +165,27 @@ With this release, the last one was renamed to `usc::zeroth_degree_Fahrenheit` t named with its corresponding unit and with the `si::zeroth_degree_Celsius` (**breaking change**). +## Changes to units definitions + +[WG21 Study Group 16 (Unicode) raised concerns](https://github.com/sg16-unicode/sg16-meetings#january-24th-2024) +about potential ABI issues when different translation units are compiled with different ordinary +literal encodings. Those issues were resolved with a change to units definitions (**breaking +change**). It affects only units that specify both Unicode and ASCII symbols. The new design +requires the Unicode symbol to be provided as a UTF-8 literal: + +=== "Now" + + ```cpp + inline constexpr struct ohm : named_unit<{u8"Ω", "ohm"}, volt / ampere> {} ohm; + ``` + +=== "Before" + + ```cpp + inline constexpr struct ohm : named_unit<{"Ω", "ohm"}, volt / ampere> {} ohm; + ``` + + ## Improved text output With this release we can print not only whole quantities but also just their units or dimensions. @@ -214,27 +235,6 @@ Also, we have finally added proper implementations of `value_cast` and `quantity quantity points. -## Changes to units definitions - -[WG21 Study Group 16 (Unicode) raised concerns](https://github.com/sg16-unicode/sg16-meetings#january-24th-2024) -about potential ABI issues when different translation units are compiled with different ordinary -literal encodings. Those issues were resolved with a change to units definitions (**breaking -change**). It affects only units that specify both Unicode and ASCII symbols. The new design -requires the Unicode symbol to be provided as a UTF-8 literal: - -=== "Now" - - ```cpp - inline constexpr struct ohm : named_unit<{u8"Ω", "ohm"}, volt / ampere> {} ohm; - ``` - -=== "Before" - - ```cpp - inline constexpr struct ohm : named_unit<{"Ω", "ohm"}, volt / ampere> {} ohm; - ``` - - ## Even better error messages This release made a few small refactorings that without changing the user-facing API allowed us