mirror of
https://github.com/mpusz/mp-units.git
synced 2025-07-30 18:37:15 +02:00
docs: 2.3.0 release announcement draft text alignment fixed
This commit is contained in:
@ -58,23 +58,23 @@ specifiers. This applies to:
|
|||||||
Here are the main points of this new design:
|
Here are the main points of this new design:
|
||||||
|
|
||||||
1. All references/units that do not specify point origin (are not offset units) in their definition
|
1. All references/units that do not specify point origin (are not offset units) in their definition
|
||||||
are considered `delta` by default. This means that `42 * m` creates a `quantity` and is
|
are considered `delta` by default. This means that `42 * m` creates a `quantity` and is
|
||||||
the same as calling `42 * delta<m>`.
|
the same as calling `42 * delta<m>`.
|
||||||
2. Multiply syntax is extended to allow `quantity_point` creation with the `42 * absolute<m>`
|
2. Multiply syntax is extended to allow `quantity_point` creation with the `42 * absolute<m>`
|
||||||
syntax. This will provide an implicit zeroth point origin.
|
syntax. This will provide an implicit zeroth point origin.
|
||||||
3. For units that specify a point origin (`si::kelvin`, `si::degree_Celsius`, and
|
3. For units that specify a point origin (`si::kelvin`, `si::degree_Celsius`, and
|
||||||
`usc::degree_Fahrenheit`), the user always needs to specify a modifier. This means that:
|
`usc::degree_Fahrenheit`), the user always needs to specify a modifier. This means that:
|
||||||
- `4 * deg_C` does not compile,
|
- `4 * deg_C` does not compile,
|
||||||
- `4 * delta<deg_C>` creates a `quantity`.
|
- `4 * delta<deg_C>` creates a `quantity`.
|
||||||
- `4 * absolute<deg_C>` creates a `quantity_point`.
|
- `4 * absolute<deg_C>` creates a `quantity_point`.
|
||||||
4. The 2-parameter `quantity` constructor requires the same:
|
4. The 2-parameter `quantity` constructor requires the same:
|
||||||
|
|
||||||
```cpp
|
```cpp
|
||||||
quantity q1(4, m); // OK
|
quantity q1(4, m); // OK
|
||||||
quantity q2(4, delta<m>); // OK
|
quantity q2(4, delta<m>); // OK
|
||||||
quantity q3(4, absolute<m>); // Compile-time error
|
quantity q3(4, absolute<m>); // Compile-time error
|
||||||
quantity q4(4, deg_C); // Compile-time error
|
quantity q4(4, deg_C); // Compile-time error
|
||||||
quantity q5(4, delta<deg_C>); // OK
|
quantity q5(4, delta<deg_C>); // OK
|
||||||
quantity q6(4, absolute<deg_C>); // Compile-time error
|
quantity q6(4, absolute<deg_C>); // Compile-time error
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user