Commit Graph
718 Commits
Author SHA1 Message Date
Mateusz Pusz fa5419b792 fix: unused parametrs identifiers removed 2023-10-04 10:14:57 -06:00
Mateusz Pusz 25f986d32c fix: MSVC-related fixes and workarounds 2023-10-04 10:00:17 -06:00
Mateusz Pusz 2281be0f76 feat: QuantityLike and QuantityPointLike conversions improved 2023-10-02 21:12:25 -06:00
Mateusz Pusz b12b9f87ae feat: quantity and quantity_point conversion operators now can also convert to const references 2023-09-30 22:23:18 -06:00
Mateusz PuszandJohel Ernesto Guerrero Peña 0999274680 Update src/core/include/mp-units/quantity_point.h
Co-authored-by: Johel Ernesto Guerrero Peña <johelegp@gmail.com>
2023-09-30 22:23:18 -06:00
Mateusz PuszandJohel Ernesto Guerrero Peña 78bf9a9add Update src/core/include/mp-units/quantity.h
Co-authored-by: Johel Ernesto Guerrero Peña <johelegp@gmail.com>
2023-09-30 22:23:18 -06:00
Mateusz Pusz 5a74cd66ba feat: interoperability with other libraries redesigned 2023-09-30 22:23:18 -06:00
Mateusz Pusz 04588d9c8b feat: Magnitude / Unit operator added 2023-09-30 21:36:23 -06:00
Mateusz Pusz f15baf4c2a fix: clang compilation fixed 2023-09-30 21:35:16 -06:00
Mateusz Pusz b2423bfded feat: quantities can now be multiplied and divided by units 2023-09-29 21:40:24 -06:00
Mateusz Pusz d5a0874bea fix: symbols of named dimensionless units with the ratio = 1 were not printed 2023-09-29 06:30:28 +02:00
Mateusz Pusz d427849477 refactor: in(U) and force_in(U) now return auto to provide better diagnostics on clang
When a strong type was returned clang, instead of on a concept check, failed on `detail::make_quantity` used to provide a function return type.
2023-09-27 17:10:20 +02:00
Mateusz Pusz b4bb7227b9 feat: UnitCompatibleWith added and applied to in(U) and force_in(U) functions 2023-09-27 17:06:08 +02:00
Mateusz Pusz 94bd2a23ca build: got rid of old gcc hacks 2023-09-26 18:25:03 +02:00
Mateusz Pusz 25fee701a0 build: got rid of old clang hacks and range-v3 dependency 2023-09-26 18:09:06 +02:00
Mateusz Pusz 77cc08ef77 fix: min and max compilation issues resolved 2023-09-26 12:32:26 +02:00
Mateusz Pusz b5f966e54f Merge branch 'master' of github.com:mpusz/units 2023-09-25 19:49:42 +02:00
Mateusz Pusz 4a83c66bf4 refactor: clang compile-time errors improved by explicit resolving a type of an using alias 2023-09-25 19:49:35 +02:00
Mateusz Pusz 80d869e13d docs: workind in one of the comments fixed 2023-09-24 19:43:58 +02:00
Mateusz Pusz 49da1ced3a refactor: make_reference added and used in constraints for quantity and quantity_point
`quantity_spec[unit]` syntax will not work for natural units and we want the interface to be widely applicable to all domains.
2023-09-20 20:31:49 +02:00
Mateusz Pusz b76337d5bb feat: pre-increment and pre-decrement operators now preserve value category 2023-09-14 12:42:45 +02:00
Mateusz Pusz ff4755d5e5 feat: quantity_ref_from disallowed for rvalues 2023-09-13 20:11:59 +02:00
Mateusz Pusz 2b3c9a6afa feat: quantity_point compound assignment now preserves the value category 2023-09-13 20:06:17 +02:00
Mateusz Pusz 2e26eed59d feat: numerical_value_ref_in disallowed for rvalues 2023-09-13 19:59:49 +02:00
Mateusz Pusz 6a1e600f65 feat: quantity compound assignment now preserves the value category 2023-09-13 19:57:05 +02:00
Mateusz Pusz dc2d0dfca7 feat: force_in(U) added for quantity_point 2023-09-13 18:40:51 +02:00
Mateusz Pusz f74da4335b refactor: quantity_point::q_ renamed to quantity_from_origin_ 2023-09-13 18:28:49 +02:00
Mateusz Pusz 2e1a017376 refactor: quantity::_value data member renamed to numerical_value_ 2023-09-13 16:21:57 +02:00
Mateusz Pusz 0e974a7f32 fix: hacks for clang-16 compilation added 2023-09-13 12:21:17 +02:00
Mateusz Pusz e085beef40 feat: qp.quantity_from(PO) added 2023-09-13 11:57:22 +02:00
Mateusz Pusz 75fc3a0384 style: more whitespace issues caused by rebase fixed 2023-09-13 11:56:06 +02:00
Mateusz Pusz f7f63e8c4c refactor: force_numerical_value_in refactored to use force_in in the implemenation and constraints 2023-09-13 10:41:15 +02:00
Mateusz Pusz 1c7928021d feat: force_in(U) support added 2023-09-13 10:18:07 +02:00
Mateusz Pusz 2b2f62d038 feat: force_numerical_value_in(U) added 2023-09-13 10:10:10 +02:00
Mateusz Pusz 40c809091d fix: numerical_value_ref_in name fixed for this deduction in quantity 2023-09-13 10:10:10 +02:00
Mateusz Pusz 3b2ca4084a refactor: quantity_point::quantity_from_origin() refactored to quantity_point::quantity_ref_from(PO)
Resolves #479 and relates to #477
2023-09-13 10:09:08 +02:00
Mateusz Pusz a7711cb301 refactor: quantity::value() refactored to quantity::value_ref_in(U) 2023-09-13 09:23:59 +02:00
Mateusz Pusz c4ad3039b3 refactor: asserts for zero simplified in quantity 2023-09-13 08:52:01 +02:00
Mateusz Pusz b6bc9434d0 fix: quantity.in(U) fixed to clone a reference from the source type 2023-09-04 12:27:49 +02:00
Mateusz Pusz f46b3dad74 feat: added an option to disable space before unit symbol in the text output
Resolves #387
2023-09-04 11:09:40 +02:00
Mateusz Pusz 14d18a9d3a style: order of operators changed 2023-08-31 19:00:35 +02:00
Mateusz Pusz f1c2c74ab0 refactor: quantity::value() renamed to quantity::numerical_value()
According to https://jcgm.bipm.org/vim/en/1.19.html "quantity value" also contains a unit. According to https://jcgm.bipm.org/vim/en/1.20.html "numerical value" is the correct term for just a number.

Resolves #423
2023-08-30 11:30:35 +02:00
Mateusz Pusz f64c08bac3 fix: integral representations allowed for irrational canonical units
Resolves #485
2023-08-29 16:04:10 +02:00
Mateusz Pusz b4cf1e57de refactor: quantity point concepts cleanup 2023-08-29 14:09:41 +02:00
Mateusz Pusz c6e9a9caf2 refactor: quantity::number_ member renamed to quantity::value_ 2023-08-26 21:05:15 +02:00
Mateusz Pusz f29c57d367 style: formatting to make pre-commit happy 2023-08-25 23:05:36 +02:00
Mateusz Pusz f7bd67bf09 fix: invalid preprocessor conditions fixed 2023-08-25 22:48:27 +02:00
Mateusz Pusz 27ec678314 refactor: workarounds to make gcc-11 compile 2023-08-25 22:47:32 +02:00
Mateusz Pusz c53b692ac9 refactor: clang-17 has a proper support for consteval 2023-08-25 21:17:48 +02:00
Mateusz Pusz 1cb20145c8 refactor: workaroud on ratio comparison to enable clang-16 compilation 2023-08-25 21:16:16 +02:00