Commit Graph
166 Commits
Author SHA1 Message Date
Mateusz Pusz 6c5f27cda7 fix: Compilation errors fixed 2020-12-28 19:23:20 +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 32391866be refactor: Limited the equivalent trait usage 2020-12-28 18:40:58 +01:00
Mateusz Pusz 008dec79ea refactor: si.h usage limited 2020-12-28 14:34:27 +01:00
Johel Ernesto Guerrero Peña 8dede0db9f feat: unit_constants 2020-12-28 12:20:54 +01:00
Mateusz Pusz b015c6badd test: Test disabled for GCC 10.1.0 2020-12-27 12:10:03 +01:00
Mateusz Pusz 2b9e9f9780 test: Unit tests compilation fixed on gcc-10.1 2020-12-23 23:26:54 +01:00
Mateusz Pusz dedf56b598 test: chrono unit tests fixed to use implementation-specific representation type 2020-12-22 14:36:11 +01:00
Mateusz Pusz a172f34684 build: Minimum CMake version required set for each file based on its contents 2020-12-21 22:56:00 +01:00
Mateusz Pusz 206712f046 build: Library renamed to mp::units 2020-12-17 23:06:37 +01:00
Mateusz Pusz af2f988b58 test: CTAD tests for chrono fixed 2020-10-09 23:32:35 +02:00
Mateusz Pusz a2891296c2 test: duplication in chrono test fixed 2020-10-09 23:29:18 +02:00
Mateusz Pusz d64d26a4c4 refactor: interoperability with quantity-like types simplified
Type trait specialization for each `quantity` type is not needed anymore.

Relates to #33.
2020-10-07 14:29:12 +02:00
Mateusz Pusz 2dd8c90250 feat: interoperability with std::chrono::duration and other units libraries
Resolves #33
2020-10-07 12:02:08 +02:00
Mateusz Pusz 043046c068 refactor: [[nodiscard]] added to min_expl 2020-10-06 19:50:36 +02:00
Mateusz Pusz 4ff96170aa build: workaround for gcc-10.0.1 added 2020-10-06 19:21:47 +02: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 cc68172de7 fix: invalid tests removed from custom_rep_min_req_test 2020-09-14 20:41:57 +02:00
Mateusz Pusz d4d23847d8 refactor: DOWNCAST_MODE renamed to UNITS_DOWNCAST_MODE 2020-09-13 18:45:46 +02:00
Mateusz Pusz 6e510b3a2a refactor: modules-like behavior for systems removed to improve broken compile-time
Reffers to #32
2020-09-13 00:11:02 +02:00
Mateusz Pusz 978c6297f0 fix: forgot to comit one file with changes 2020-09-11 21:24:22 +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 a388959133 test: additional tests for dimension specific concepts added 2020-09-10 13:03:24 +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 d24363af98 Revert "refactor: squared units use *2 now instead of sq_* prefix"
This reverts commit dcc2d24c8e.
2020-09-10 11:26:41 +02:00
Johel Ernesto Guerrero Peña 673de3af4c test: dimension concept with quantities differing in exponents 2020-09-10 08:37:36 +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 dcc2d24c8e refactor: squared units use *2 now instead of sq_* prefix 2020-09-09 19:53:48 +02:00
Mateusz Pusz 4bfdc60521 chore: invalid unit fixed in a commented out code 2020-09-09 19:21:32 +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 9a49df7222 refactor: 💥 Scalar concept renamed to ScalableNumber
Resolves #114
2020-09-08 21:17:09 +02:00
Mateusz Pusz 76b6c2972d test: more unit tests for dimensionless quantity 2020-09-08 18:45:14 +02:00
Mateusz Pusz 7ed4f19ef3 refactor: ♻️ exp_* operations on exponents renamed to `exponent_* 2020-09-08 11:10:33 +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 7e2841dcaa test: Floating-point comparison improved in si_fps_test.cpp 2020-09-07 11:14:00 +02:00
Mateusz Pusz 73636cbb8e Invalid test removed 2020-09-06 15:36:04 +02:00
Mateusz Pusz 77e11173bf Unit tests compilation fixed on VS 2020-09-06 15:35:08 +02:00
Johel Ernesto Guerrero Peña f1f23aa8f9 test: codify comments 2020-09-06 09:55:59 +02:00