Skip to content

[support] construct the quantity elements from their value and reference - #1102

Merged
FrancoisCarouge merged 1 commit into
masterfrom
support/mp-units-offset-unit
Nov 23, 2026
Merged

FrancoisCarouge merged 1 commit into
masterfrom
support/mp-units-offset-unit

Conversation

@FrancoisCarouge

@FrancoisCarouge FrancoisCarouge commented Nov 21, 2026 •

Copy link
Copy Markdown
Owner

The element casters of the mp-units facade constructed a quantity as value * To::reference, which mp-units deprecates for an offset unit such as the kelvin: a typed matrix of temperatures did not compile under -Werror. They now construct it as To{value, To::reference}, the same for every unit. test/x/kelvin_unit_2x1x0 reads back a state of temperatures. TypedLinearAlgebra's identical facade receives the same change in FrancoisCarouge/TypedLinearAlgebra#611.

The element casters of the mp-units facade constructed a quantity as the product of its value by its reference, which mp-units deprecates for an offset unit, such as the kelvin of a temperature, in favour of the explicit `delta` and `point` helpers: a typed matrix of temperatures did not compile. Constructing the quantity from its value and its reference is the same for every unit, an offset unit included.
@FrancoisCarouge
FrancoisCarouge force-pushed the support/mp-units-offset-unit branch from 9fe306b to 5e80aad Compare November 23, 2026 05:10
@github-actions

Copy link
Copy Markdown
lines.......: 100.0% (608 of 608 lines)
functions...: 100.0% (2951 of 2951 functions)
branches....: 50.1% (825 of 1646 branches)

@FrancoisCarouge
FrancoisCarouge merged commit c99b433 into master Nov 23, 2026
35 checks passed
@FrancoisCarouge
FrancoisCarouge deleted the support/mp-units-offset-unit branch November 23, 2026 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant