mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-01 03:14:29 +02:00
docs: 2.2 release announcement updated
This commit is contained in:
@@ -299,6 +299,27 @@ is why it was renamed to `symbol_text` (:boom: **breaking change** :boom:).
|
|||||||
inline constexpr struct ohm final : named_unit<{u8"Ω", "ohm"}, volt / ampere> {} ohm;
|
inline constexpr struct ohm final : named_unit<{u8"Ω", "ohm"}, volt / ampere> {} ohm;
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## Changes to dimension and quantity specification definitions
|
||||||
|
|
||||||
|
Similarly to units, now also all dimensions and quantity specifications have to be marked final
|
||||||
|
(:boom: **breaking change** :boom:).
|
||||||
|
|
||||||
|
=== "Now"
|
||||||
|
|
||||||
|
```cpp
|
||||||
|
inline constexpr struct dim_length final : base_dimension<"L"> {} dim_length;
|
||||||
|
inline constexpr struct length final : quantity_spec<dim_length> {} length;
|
||||||
|
```
|
||||||
|
|
||||||
|
=== "Before"
|
||||||
|
|
||||||
|
```cpp
|
||||||
|
inline constexpr struct dim_length : base_dimension<"L"> {} dim_length;
|
||||||
|
inline constexpr struct length : quantity_spec<dim_length> {} length;
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## Improved text output
|
## Improved text output
|
||||||
|
|
||||||
With this release, we can print not only whole quantities but also just their units or dimensions.
|
With this release, we can print not only whole quantities but also just their units or dimensions.
|
||||||
|
Reference in New Issue
Block a user