Commit Graph
91 Commits
Author SHA1 Message Date
Mateusz Pusz 833851d1cb test: tests for printing of a symbol of a dimensionless unit with the ratio = 1 2023-09-29 06:31:32 +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 f29c57d367 style: formatting to make pre-commit happy 2023-08-25 23:05:36 +02:00
Mateusz Pusz 3cc653fae1 build: fmt updated to 10.1.0 to enable gcc-13 compilation 2023-08-23 20:01:23 +02:00
Mateusz Pusz 7b47b2fe57 fix: text output of 8-bit integers fixed (resolves #470) 2023-07-05 11:24:53 +02:00
Mateusz Pusz 52ce2b21f7 refactor: iostream.h renamed to ostream.h 2023-06-23 15:03:04 +02:00
Mateusz Pusz ba1f58af76 refactor: All the macros refactored to have MP_UNITS_ prefix 2023-06-21 18:05:21 +02:00
Mateusz Pusz 3d20dfef91 refactor: unit_symbol_separator::dot renamed to half_high_dot 2023-06-18 10:28:51 +02:00
Mateusz Pusz 52bbd00ab4 style: clang-format new rules applied to the code base 2023-05-26 14:20:00 +02:00
Mateusz Pusz 561fbf7c93 merge branch master 2023-05-26 13:53:52 +02:00
Mateusz Pusz 7d9ae3ec31 refactor: mp_units subdirectory renamed to mp-units 2023-05-25 12:47:10 +02:00
Mateusz Pusz 546a8a79a9 test: fmt test fixed for radian 2023-04-21 15:03:07 +01:00
Mateusz Pusz 6d033d72fe fix(unit test): quantity construction switched to a new syntax in unit tests 2023-02-13 19:05:58 +01:00
Mateusz Pusz 83aee04da0 refactor: quantity_io.h renamed to iostream.h 2023-02-03 16:57:48 +01:00
Mateusz Pusz b4f47c3fef feat: value_cast support added
Resolves #239 and #120
2023-02-03 11:08:13 +01:00
Mateusz Pusz 9a7a55b873 test: test's text output fixed after unit ordering change 2023-01-05 10:39:23 +01:00
Mateusz Pusz 2cf736a1e6 feat: preventing possible future units crash when using namespace std;
Resolves #317
2022-12-29 20:18:48 +01:00
Mateusz Pusz 6b72dd39c1 refactor: headers with system definitions moved to _systems_ subdirectory 2022-12-29 19:27:54 +01:00
Mateusz Pusz 97da55edfa refactor: the rest of the systems refactored for V2 2022-12-29 18:59:10 +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 82b1f7ffc0 refactor(example): RepresentationOf support added to examples 2022-12-20 17:26:55 +01:00
Mateusz Pusz b7884b90a8 Revert "feat: ISQ quantity names conflicts resolved with inline namespaces"
This reverts commit 043410d2f8.
2022-12-20 12:46:07 +01:00
Mateusz Pusz 043410d2f8 feat: ISQ quantity names conflicts resolved with inline namespaces 2022-12-20 11:20:47 +01:00
Mateusz Pusz 7423acd6a7 test: negative tests for formatting added 2022-11-08 11:19:12 -10:00
Mateusz Pusz c32a4cea8a test: fmt tests refactored for V2 2022-11-07 16:21:30 -10:00
Mateusz Pusz a39a49c147 test: VS2019 compilation fixed 2022-09-02 10:21:58 +02:00
Mateusz Pusz 707b39f0c4 build: catch2 updated to 3.1.0 2022-09-01 16:19:51 +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 46b3781743 Revert "refactor: 💥 ! " ⋅ " replaced with "⋅" in derived unit symbols"
This reverts commit db09a065ab.
2022-05-24 14:20:17 +02:00
Mateusz Pusz 38fb9911a9 refactor: 💥 ! " ⋅ " replaced with "⋅" in derived unit symbols 2022-05-24 12:56:14 +02:00
Mateusz Pusz db09a065ab refactor: 💥 ! " ⋅ " replaced with "⋅" in derived unit symbols 2022-05-24 12:48:07 +02:00
Chip Hogg 5fb468697b Merge branch 'master' into chiphogg/switch-to-mag 2022-05-12 16:12:01 +00: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 f5d21a0711 refactor: 💥 ! derived_unit renamed to derived_deduced_unit 2022-05-11 11:23:18 +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 144f6951c0 style: all files refromatted with clang-format 2022-03-17 23:59:48 +01:00
Mateusz Pusz e19b9e93e9 test: forgot to change the other preprocessor check as well 2021-11-15 17:41:02 +01:00
Mateusz Pusz d6bb6c8bc9 test: fmt test compilation on VS2019 fixed 2021-11-15 17:12:44 +01:00
Mateusz Pusz 6f38e77426 test: [fmt] unit test fixed for std::format in VS2022 2021-11-15 16:36:09 +01:00
Mateusz Pusz 506408a316 fix: fmt_test compilation fixed 2021-11-08 19:05:08 +01:00
Mateusz Pusz 9f95799288 refactor: got rid of FMT_RUNTIME() as it is not the part of C++20 2021-11-08 18:37:37 +01:00
Mateusz Pusz b1bd4cab2d feat: std::format support for compliant compilers added 2021-09-20 15:01:58 +02:00
Mateusz Pusz 8740857a47 build: fmt updated to 8.0.1 2021-09-16 20:24:27 +02:00
Mateusz Pusz 8e88f06380 refactor: *deduced_unit renamed to *derived_unit 2021-05-10 15:56:48 +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 bbbb77286c refactor: physical replaced with isq
Refers to #249
2021-03-16 12:03:25 +01:00
Mateusz Pusz 5c94a40906 build: COMP_XXX renamed to UNITS_COMP_XXX 2021-03-15 21:13:21 +01:00
Mateusz Pusz cff718301c refactor: quantity_io added 2020-12-28 15:18:36 +01:00
Mateusz Pusz d4d23847d8 refactor: DOWNCAST_MODE renamed to UNITS_DOWNCAST_MODE 2020-09-13 18:45:46 +02:00