Chip Hogg
ef9e6522ca
Merge branch 'master' into chiphogg/switch-to-mag
2022-06-15 20:50:30 +00:00
Mateusz Pusz
842f2eaf27
feat: quantity CTAD guide added
2022-05-22 19:47:11 +02:00
Chip Hogg
5fb468697b
Merge branch 'master' into chiphogg/switch-to-mag
2022-05-12 16:12:01 +00: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
Johel Ernesto Guerrero Peña
146f1d1c83
fix: improve downcast mode off
2022-03-28 10:58:02 -04:00
Mateusz Pusz and Johel Ernesto Guerrero Peña
6531d188d1
Update src/core/include/units/quantity.h
...
Co-authored-by: Johel Ernesto Guerrero Peña <johelegp@gmail.com >
2022-03-18 08:20:43 +01:00
Mateusz Pusz and Johel Ernesto Guerrero Peña
f4fbac86b4
Update src/core/include/units/quantity.h
...
Co-authored-by: Johel Ernesto Guerrero Peña <johelegp@gmail.com >
2022-03-18 08:20:36 +01:00
Mateusz Pusz and Johel Ernesto Guerrero Peña
03290d74a2
Update src/core/include/units/quantity.h
...
Co-authored-by: Johel Ernesto Guerrero Peña <johelegp@gmail.com >
2022-03-18 08:20:27 +01:00
Mateusz Pusz and Johel Ernesto Guerrero Peña
6e59e7a927
Update src/core/include/units/quantity.h
...
Co-authored-by: Johel Ernesto Guerrero Peña <johelegp@gmail.com >
2022-03-18 08:20:08 +01:00
Mateusz Pusz
144f6951c0
style: all files refromatted with clang-format
2022-03-17 23:59:48 +01:00
Johel Ernesto Guerrero Peña
3f145a25db
refactor: update hacks for LLVM 15
2022-02-07 21:07:22 -04:00
Johel Ernesto Guerrero Peña
4efed3c6d4
refactor: update Clang 14 to not require range-v3 ( #321 )
...
* Revert "refactor: update hacks for LLVM 14"
This reverts commit d142844de7 .
* refactor: update Clang 14 to not require range-v3
2021-12-13 10:01:16 +01:00
Mateusz Pusz
240ec3a460
build: CTAD for quantity is not supported by clang
2021-10-20 19:58:31 +02:00
Mateusz Pusz
b7b8a0bf93
fix: CTAD for aliases fixed
2021-10-20 18:52:13 +02:00
Johel Ernesto Guerrero Peña
417f842585
fix: constraint recursion for GCC 11
2021-09-17 20:11:38 +02:00
Mateusz Pusz
ed5749a52b
refactor: quantity op+() and op-() reimplemented in terms of reference rather then quantity types
...
`common_quantity`, `common_quantity_for`, `common_quantity_point`, `common_quantity_kind`, and `common_quantity_point_kind` removed
Resolves #290
2021-07-27 14:40:05 +02:00
Ralph J. Steinhagen
7ed29807a6
removed superfluous requires statement in is_quantity<T>
2021-06-29 20:31:06 +02:00
Ralph J. Steinhagen
8e1539bf22
added inheritance unit-test and made is_quantity<T> more specific
2021-06-29 20:31:06 +02:00
Mateusz Pusz
8540389530
fix: op% fixed for the same argument types case
2021-05-11 19:36:07 +02:00
Mateusz Pusz
1783d243da
fix: quantity modulo arithmetics fixed
...
Resolves #231
2021-05-11 15:03:04 +02:00
Mateusz Pusz
6d39459cbc
perf: rvalue references support added for constructors and getters
...
Resolves #275
2021-05-03 19:44:50 +02:00
Mateusz Pusz
e39ef2f850
fix: reference redefined in terms of dimension and unit
2021-04-09 12:52:15 +02:00
Mateusz Pusz
309da80c32
refactor: unit_text.h header include moved to text-related targets
2021-03-31 12:25:26 +02:00
Mateusz Pusz
37cfc53d1d
refactor: IWYU applied to the source files
...
`alternative_namespaces` examples left out as I consider them a subject for removal in the nearest future.
2021-03-30 13:21:05 +02:00
Mateusz Pusz
88e642ec74
refactor: QuantityValue concept renamed to Representation
2021-03-19 07:53:18 +01:00
Mateusz Pusz
ca7762177f
refactor: quantity::value_ renamed to quantity::number_
...
Refers to #259
2021-03-19 07:01:12 +01:00
Mateusz Pusz
901b09fd52
refactor: quantity::count() renamed to quantity::number()
...
Resolves #259
2021-03-19 06:47:37 +01:00
Johel Ernesto Guerrero Peña
ddbbb8ac55
style: remove braces from value
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
234337d310
refactor: use perfect forwarding for make functions
...
Addresses https://github.com/mpusz/units/pull/261#discussion_r597131272 .
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
1068f7d182
refactor: use values rather than types for reference
...
Addresses https://github.com/mpusz/units/pull/261#discussion_r596661260 .
2021-03-18 22:37:25 +01:00
Johel Ernesto Guerrero Peña
dd1a46cd35
style: mark comment as TODO
...
Addresses https://github.com/mpusz/units/pull/261#discussion_r596641518 .
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
Mateusz Pusz
221883bb25
build: core library and each system separated to dedicated CMake targets
...
Refers to #249
2021-03-16 23:05:45 +01:00