Commit Graph

64 Commits

Author SHA1 Message Date
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 ints 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
Mateusz Pusz
79558a6d72 refactor: systems defined in terms of SI moved under si namespace 2020-09-10 17:14:33 +02:00
Mateusz Pusz
9cd0cb4105 feat: two argument explicit cast support added 2020-09-10 13:01:38 +02:00
Mateusz Pusz
58daacfd58 fix: unit tests fixed for DOWNCAST_MODE = OFF 2020-09-10 11:33:58 +02:00
Mateusz Pusz
c4aa67477c test: new dimensionless tests refactored to work with downcasting=OFF 2020-09-10 00:35:25 +02:00
Mateusz Pusz
e367afed71 Merge branch 'downcasting_2.0' 2020-09-09 20:31:03 +02:00
Mateusz Pusz
9527b39005 refactor: 💥 q_* UDL renamed to _q_*
We had some fun exploring the STD UDLs for potential collisions,
we have learnt our lesson and know how to proceed.
Now is high time to start behaving and obeying C++ rules.
2020-09-09 19:20:35 +02:00
Mateusz Pusz
2b408f19c0 Merge branch 'master' of github.com:mpusz/units 2020-09-09 11:22:58 +02:00
Mateusz Pusz
3e9d5ca189 refactor: ♻️ unitless renamed to one
Resolves #27
2020-09-09 11:20:55 +02:00
Johel Ernesto Guerrero Peña
749684c8ee style: fix name numbering 2020-09-09 08:53:53 +02:00
Johel Ernesto Guerrero Peña
ce583d40e0 style: name parameter after what's being tested 2020-09-09 08:53:53 +02:00
Johel Ernesto Guerrero Peña
2853a20c7f style: remove empty parameter list 2020-09-09 08:53:53 +02:00
Johel Ernesto Guerrero Peña
9a130d9b5b test: percent to unitless conversion 2020-09-09 08:53:53 +02:00
Johel Ernesto Guerrero Peña
c842115604 test: dimensionless common type 2020-09-09 08:53:53 +02:00
Mateusz Pusz
76b6c2972d test: more unit tests for dimensionless quantity 2020-09-08 18:45:14 +02:00
Mateusz Pusz
563b358d5e feat!: 💥 dimensionless quantities refactored
Dimensionless quantities are now represented by quantity types rather
than by plain representation types. Only dimensionless quantities with
`unitless` unit are implicitly convertible from representation types.

`units::exp()` now is a function doing std::exp() on a representation
type (previous `units::exp` class template was renamed to
`units::exponent`).

BREAKING_CHANGE: gcc-9.3 support removed
BREAKING_CHANGE: `exp` and `Exp` renamed to `exponent` and `Exponent`
Resolves #27
Resolves #42
2020-09-08 11:02:16 +02:00
Mateusz Pusz
77e11173bf Unit tests compilation fixed on VS 2020-09-06 15:35:08 +02:00
Johel Ernesto Guerrero Peña
71eda2fc66 test: codify comment in the correct place 2020-09-06 09:55:59 +02:00
Johel Ernesto Guerrero Peña
9f9397ffc2 test: convert comments to code 2020-09-06 09:55:59 +02:00
Mateusz Pusz
5c98924efb Downcasting reworked to allow OFF and AUTO modes 2020-08-19 13:37:57 +02:00
Mateusz Pusz
deb1ee6efa Truncating conversions disalowed for *=, /=, +=, amd -= operators (resolves #137) 2020-08-16 13:29:40 +02:00
Mateusz Pusz
9f94a73bba Custom is_same implementation added 2020-06-29 20:30:59 +02:00
Mateusz Pusz
d171f5451e NTTP ratio support added (resolves #49) 2020-06-27 19:15:46 +02:00
Mateusz Pusz
86b9177816 Specialize common_type to satisfy comparison concepts (resolves #113) 2020-05-28 20:19:05 +02:00
Mateusz Pusz
ce301748dd Velocity renamed to Speed (resolves #103) 2020-05-10 17:31:47 +02:00
Mateusz Pusz
7e935a4108 Physical units put in the physical namespace (I am sorry) 2020-05-08 22:39:24 +02:00
Mateusz Pusz
1830735544 Unit tests for alias_unit added 2020-05-08 21:18:16 +02:00
Mateusz Pusz
0a906450a2 Custom representation tests moved to a new file 2020-03-24 22:56:11 +01:00
Mateusz Pusz
6a5f25750d UDL naming refactored 2020-03-10 20:53:53 +01:00