Mateusz Pusz
eee6f7ed87
style: core code reformatted with clang-format-16
2022-11-10 16:46:56 -10:00
Mateusz Pusz
f2e63fdeb1
refactor: std::common_type usage replaced with dedicated functions for units, dimensions, and references
2022-11-09 18:39:51 -10:00
Mateusz Pusz
649252d691
refactor: system_reference moved to a dedicated header file
2022-11-09 18:33:39 -10:00
Mateusz Pusz
61b88b919f
refactor: convertible() renamed to interconvertible()
2022-11-08 10:57:05 -10:00
Mateusz Pusz
3d1f339115
refactor: reference now takes NTTPs rather then types
...
Even though it makes error logs a bit more obscure it simplifies coding a lot.
2022-11-08 10:37:41 -10:00
Mateusz Pusz
4938e9d5c0
feat: Added support for natural units-like systems + dimension_one cleanup
2022-11-04 19:29:05 +01:00
Mateusz Pusz
cb861dd81a
feat: system's definition highly simplified by removing the need for a system_reference for most cases
2022-10-25 07:27:08 +02:00
Mateusz Pusz
8793aeec23
feat: convertibility check added for the target unit in the system_reference
2022-10-19 13:16:10 +02:00
Mateusz Pusz
03e064fccd
feat: equivalent support removed
2022-10-18 22:57:02 +02:00
Mateusz Pusz
6e8ca72678
refactor: dimensions design cleanup
2022-10-18 17:52:52 +02:00
Mateusz Pusz
cf0a770d9b
refactor: quantity arithmetics implemented
2022-10-09 21:32:38 +01:00
Mateusz Pusz
4a49bdda05
refactor: V2 design update
2022-10-06 23:43:01 +01:00
Mateusz Pusz
70185b49c2
refactor: constexpr replaced with consteval
2022-09-15 14:52:54 -06:00
Mateusz Pusz
daf97a3a86
feat: initial very dirty version of V2 framework
2022-09-08 19:11:45 +02:00
Mateusz Pusz
0ebf85b9db
fix: unknown_coherent_unit fixed
2022-08-01 11:59:00 +02:00
Chip Hogg
d19b2803ce
Migrate units from ratio to Magnitude
...
This commit is huge, but hopefully the cognitive load is not too bad.
The bulk of this commit is just some fairly mechanical updates from
`ratio` to `Magnitude`. Other things to call out:
- `UnitRatio` goes away. We don't need this concept, because Magnitude
can't even _represent_ anything that doesn't satisfy it.
- I commented out some formatting test cases where the precise
expression changes, but the number is completely equivalent. We will
need to decide how we want to handle Magnitude formatting as a
separate, follow-on task. But at least Magnitude gives us all the
tools we'll need to do so!
2022-04-11 15:16:16 +00:00
Mateusz Pusz
144f6951c0
style: all files refromatted with clang-format
2022-03-17 23:59:48 +01:00
Mateusz Pusz
0ac00534d6
feat: equality comparison support added for reference
2021-04-08 18:54:49 +02:00
Mateusz Pusz
bd862d3517
refactor: Fine-grained references support added
2021-04-07 11:26:45 +02:00
Mateusz Pusz
88e642ec74
refactor: QuantityValue concept renamed to Representation
2021-03-19 07:53:18 +01:00
Johel Ernesto Guerrero Peña
f0cfc14b83
refactor: remove operator/(Rep, reference)
...
Addresses https://github.com/mpusz/units/pull/261#discussion_r597289047 .
2021-03-19 06:31:12 +01:00
Johel Ernesto Guerrero Peña
5914ae2260
docs(src): expand on non-allowed syntaxes
2021-03-18 22:37:25 +01:00
Johel Ernesto Guerrero Peña
ced4b3bbed
refactor: make reference's interface hidden friends
...
Addresses:
- https://github.com/mpusz/units/pull/261#discussion_r597135187
- https://github.com/mpusz/units/pull/261#discussion_r597152408
2021-03-18 22:37:25 +01:00
Johel Ernesto Guerrero Peña
0b87e7c99c
refactor!: require explicit number for references
...
Addresses:
- https://github.com/mpusz/units/pull/261#discussion_r596651065
- https://github.com/mpusz/units/pull/261#discussion_r596664550
- https://github.com/mpusz/units/pull/261#discussion_r597132294
2021-03-18 22:37:25 +01:00
Johel Ernesto Guerrero Peña
6d9abe97e5
docs: rephrase 'unit constant' to 'quantity reference'
2021-03-18 22:37:25 +01:00
Johel Ernesto Guerrero Peña
0c09871bca
fix: do not forward declare reference's interface on MSVC
2021-03-18 22:37:25 +01:00
Johel Ernesto Guerrero Peña
018c5837f9
refactor: rename unit_constants to references
...
Addresses https://github.com/mpusz/units/pull/261#discussion_r596663522 .
2021-03-18 22:37:25 +01:00
Johel Ernesto Guerrero Peña
4622979ed9
refactor: make the interface of reference more visible
2021-03-18 22:37:25 +01:00
Johel Ernesto Guerrero Peña
9a520edfe9
refactor!: replace one_rep with reference<D, U>
2021-03-18 22:37:25 +01:00