Mateusz Pusz
210f401416
refactor: units ordering do need type_name (it also caused worse ordering on text output)
2022-12-27 10:08:59 +01:00
Mateusz Pusz
07687f9ef6
refactor: _generic/dimensionless.h_ removed (units added to _unit.h_)
2022-12-25 17:14:54 +01:00
Mateusz Pusz
979a00e704
fix: get_canonical_unit() fixed for powers of derived quantities
2022-12-19 20:35:22 +01:00
Mateusz Pusz
7a26125e16
refactor: public headers cleanup
...
Public headers should be only the ones that a user may have a need to actually include in his/her code.
2022-12-19 14:55:54 +01:00
Mateusz Pusz
f37ec4c62b
refactor: missing nodiscards added to functions in _unit.h_
2022-12-16 18:18:14 +01:00
Mateusz Pusz
92c70f1a4e
feat: quantity_spec support added
2022-12-16 18:15:48 +01:00
Mateusz Pusz
d9b227ad30
feat: units now allow inheritance
...
For example to define `cgs::second` based on `si::second`
2022-12-04 15:04:37 +01:00
Mateusz Pusz
5cbe322c82
feat: common_reference, common_dimension, and common_units now take variadic list of arguments
2022-11-30 10:11:52 +01:00
Mateusz Pusz
d75f22ecc4
feat: constant_unit support added
2022-11-10 09:55:43 -10:00
Mateusz Pusz
411f7a0bb7
refactor: magnitude_text() moved to the magnitude header file
2022-11-09 22:50:19 -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
61b88b919f
refactor: convertible() renamed to interconvertible()
2022-11-08 10:57:05 -10:00
Mateusz Pusz
e3863e8f8d
refactor: unit_symbol_denominator renamed to unit_symbol_solidus
2022-11-07 16:18:11 -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
9915ae22b5
fix: __cpp_explicit_this_parameter spelling fixed
2022-10-25 19:31:41 +02: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
8dcdc7bdac
fix: printing of symbols with fractional powers fixed
2022-10-23 22:19:44 +02:00
Mateusz Pusz
e7bebac2a7
feat: power<Num, Den>() support added for dimensions and units
2022-10-23 10:47:12 +02:00
Mateusz Pusz
08b7716f51
feat: std::common_type support for unit added
2022-10-22 20:59:44 +02:00
Mateusz Pusz
b78abce0ae
fix: invalid assertions fixed
2022-10-22 20:19:51 +02:00
Mateusz Pusz
7e18694790
refactor: gsl_Assert replaced with gsl_Expects
2022-10-22 19:31:20 +02:00
Mateusz Pusz
17036cb2d0
feat: unit symbol text output support added
2022-10-22 19:27:39 +02:00
Mateusz Pusz
914d24a903
refactor: not empty constraints added for defining a symbol
2022-10-21 23:13:10 +02:00
Mateusz Pusz
0b9b159695
fix: units design refactored and fixed
2022-10-20 14:03:15 +02:00
Mateusz Pusz
5975e4c1cc
refactor: named_unit<S, U> should inherit from U to for a correct inheritance hierarchy
2022-10-19 13:16:59 +02:00
Mateusz Pusz
ec1dace1f9
feat: PrefixableUnit concept introduced
2022-10-19 13:15:02 +02:00
Mateusz Pusz
a5c7934e0e
refactor: units nearly done
2022-10-18 21:24:09 +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
2f365b5135
refactor: mag and mag_power changed to variable templates
2022-09-15 15:13:46 -06:00
Mateusz Pusz
70185b49c2
refactor: constexpr replaced with consteval
2022-09-15 14:52:54 -06:00
Mateusz Pusz
f516e3287e
refactor: nodiscard added
2022-09-08 23:08:00 +02:00
Mateusz Pusz
daf97a3a86
feat: initial very dirty version of V2 framework
2022-09-08 19:11:45 +02:00
Mateusz Pusz
9aa3fd4d00
fix: prefixed_alias_unit constraints fixed
2022-08-03 11:29:20 +02:00
Mateusz Pusz
0ebf85b9db
fix: unknown_coherent_unit fixed
2022-08-01 11:59:00 +02: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
ef9e6522ca
Merge branch 'master' into chiphogg/switch-to-mag
2022-06-15 20:50:30 +00:00
Mateusz Pusz
ef7e7c4cfc
refactor: detail::same_scaled_units renamed to detail::compatible_units
2022-05-23 20:47:29 +02:00
Mateusz Pusz
6c1062e166
fix: UNITS_MSVC_WORKAROUND() added
2022-05-14 11:22:09 +02:00
Chip Hogg
59fa420272
Fix remaining builds/tests
2022-05-12 16:52:05 +00:00
Chip Hogg
5fb468697b
Merge branch 'master' into chiphogg/switch-to-mag
2022-05-12 16:12:01 +00:00
Mateusz Pusz
7737167d1d
fix: unit symbol text output unit tests fixed
2022-05-11 18:10:51 +02:00
Mateusz Pusz
5300caf17b
refactor: 💥 ! derived_deduced_unit renamed to derived_scaled_unit
...
Naming is hard ;-)
2022-05-11 12:34:52 +02:00
Mateusz Pusz
32b36fb670
refactor: 💥 ! PrefixFamily support removed
...
It doesn't have much sense to restrict prefixes usage for most units and in many places we were wrong to do so already.
2022-05-11 11:59:33 +02:00
Mateusz Pusz
725d193122
refactor: 💥 ! U::is_named removed from the unit types and replaced with NamedUnit concept
2022-05-11 11:49:14 +02:00
Mateusz Pusz
0522bae972
refactor: 💥 ! unit renamed to derived_unit
2022-05-11 11:40:19 +02:00
Mateusz Pusz
f5d21a0711
refactor: 💥 ! derived_unit renamed to derived_deduced_unit
2022-05-11 11:23:18 +02:00
Mateusz Pusz
8d0b643bb3
refactor: 💥 !named_derived_unit removed as it was not used
2022-05-11 11:10:15 +02:00
Chip Hogg
78bcb3b019
Remove troublesome ::ratio members
...
For some reason, MSVC seems to want to instantiate these, even though
nobody ever asks for them (as evidenced by the fact that the builds
passed on other architectures).
2022-04-12 00:35:17 +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