Johel Ernesto Guerrero Peña
fbbddb9e7b
refactor: update hacks for LLVM 17
2023-03-04 14:28:37 -04:00
Mateusz Pusz
0ebf85b9db
fix: unknown_coherent_unit
fixed
2022-08-01 11:59:00 +02:00
Johel Ernesto Guerrero Peña
e988e1d74e
refactor: update hacks for LLVM 16
2022-07-29 17:17:07 -04:00
Chip Hogg
ea83af8aa9
Rename as_magnitude<...>()
to mag<...>()
...
This is easier to write and to read.
2022-07-29 01:46:06 +00:00
Chip Hogg
6a9dcb30de
Migrate explicit-exp
inputs
2022-07-20 00:52:36 +00:00
Chip Hogg
ef9e6522ca
Merge branch 'master' into chiphogg/switch-to-mag
2022-06-15 20:50:30 +00:00
Mateusz Pusz
768f400cc3
test: quantity CTAD tests enabled only for the newest compilers
2022-05-23 09:56:45 +02:00
Mateusz Pusz
4498adce7c
test: test for new quantity
CTAD guide added
2022-05-22 19:49:10 +02:00
Chip Hogg
5fb468697b
Merge branch 'master' into chiphogg/switch-to-mag
2022-05-12 16:12:01 +00:00
Mateusz Pusz
4c60447a28
Merge branch 'master' into downcast_mode_off
2022-05-09 19:12:02 +02:00
Mateusz Pusz
ffa0f321f9
fix: shadowing compilation errors on MSVC fixed
2022-05-06 10:00:39 +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
b221dace3f
style: clang-format applied to the remaining files
2022-04-02 21:36:42 +02:00
Johel Ernesto Guerrero Peña
146f1d1c83
fix: improve downcast mode off
2022-03-28 10:58:02 -04:00
Johel Ernesto Guerrero Peña
feb1a0b860
test(static): simplify quotient_remainder_theorem test cases
2022-03-21 14:29:50 -04: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
ca3d111579
fix: CTAD test disabled for most of the compilers
2021-10-20 20:18:15 +02: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
Mateusz Pusz
120d863c40
test: derived_quantity
-related compilation error fixed
2021-09-09 09:26:23 +02:00
Ralph J. Steinhagen
322cde70b9
added HEP specific units and definitions
...
in accordance with https://www.bipm.org/documents/20126/41483022/SI-Brochure-9.pdf#page=147
see also disccusion thread #292
2021-08-03 10:56:47 +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
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
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
901b09fd52
refactor: quantity::count()
renamed to quantity::number()
...
Resolves #259
2021-03-19 06:47:37 +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
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
9a520edfe9
refactor!: replace one_rep with reference<D, U>
2021-03-18 22:37:25 +01:00
Mateusz Pusz
bbbb77286c
refactor: physical
replaced with isq
...
Refers to #249
2021-03-16 12:03:25 +01:00
Mateusz Pusz
23720d055e
refactor: Refactored the library file tree
...
Resolves #249
2021-03-16 09:32:28 +01:00
Mateusz Pusz
5c94a40906
build: COMP_XXX
renamed to UNITS_COMP_XXX
2021-03-15 21:13:21 +01:00
Johel Ernesto Guerrero Peña
94eb477f02
refactor: apply comments
2021-03-15 15:19:50 +01:00
Johel Ernesto Guerrero Peña
3002c5673d
test: compile quantity_test.cpp with -DUNITS_DOWNCAST_MODE=0
2021-03-15 14:24:26 +01:00
Johel Ernesto Guerrero Peña
017183653d
feat: full-on dimensional analysis between related quantity kinds
2021-02-21 00:17:03 +01:00
Johel Ernesto Guerrero Peña
00d182e133
fix: operators to behave like the underlying type's
2021-02-16 19:25:13 +01:00
Johel Ernesto Guerrero Peña
6bf09aa646
feat: quantity_kind and quantity_point_kind
2021-02-15 19:31:08 +01:00
Johel Ernesto Guerrero Peña
a168f49b66
fix: lack of compound assignment from dimensionless<one>
2021-02-15 17:07:55 +01:00
Johel Ernesto Guerrero Peña
98c15a2356
fix: quantity_cast between different, equivalent dimensions
2021-01-18 21:27:16 +01:00
Mateusz Pusz
ba37c37abd
fix: MSVC compilation fixed
2021-01-06 19:06:09 +01:00
Mateusz Pusz
f4ff02f8e5
fix: quantity's compound operators fixed to behave like int
s do
2021-01-06 16:44:32 +01:00
Mateusz Pusz
6d7cda949e
fix: quantity_cast
now correctly casts to an alias_unit
2021-01-02 10:56:50 +01:00
Mateusz Pusz
3d081d37e6
perf: std::is_same_v
replaced with units::is_same_v
2020-12-28 18:42:03 +01:00
Mateusz Pusz
b015c6badd
test: Test disabled for GCC 10.1.0
2020-12-27 12:10:03 +01:00
Mateusz Pusz
cfc90f4aac
refactor: 💥 basic_concepts, quantity
and quantity_cast
refactored
...
BREAKING CHANGE: ScalableNumber renamed to QuantityValue
Resolves #107
2020-10-06 18:17:52 +02:00
Mateusz Pusz
c6a5d9e222
fix: broken requires expressions fixed
2020-09-23 16:38:40 +02:00
Mateusz Pusz
a098f97c08
feat: CTAD for dimensionless quantity added
2020-09-23 16:34:13 +02:00
Mateusz Pusz
d4d23847d8
refactor: DOWNCAST_MODE
renamed to UNITS_DOWNCAST_MODE
2020-09-13 18:45:46 +02:00
Mateusz Pusz
2a56438f1c
refactor: file tree with systems defninitions refactored to limit ODR issues
...
Relates to #32 as with this commit we created something like modules for derived quantities
2020-09-11 18:11:25 +02:00