Mateusz Pusz
40dc07a42c
refactor: quantity_point default-constructibility removed from the quantity_from constraints
2024-09-06 18:31:51 +02:00
Mateusz Pusz
c06a533f50
refactor: Representation concepts now requires WeaklyRegular instead of std::regular
2024-09-06 18:30:58 +02:00
Mateusz Pusz
664d52c0c0
refactor: perfect forwarding interfaces improved
2024-09-06 16:02:51 +02:00
Mateusz Pusz
cbe37cdadf
fix: compiler crashes workaround
2024-09-06 15:57:11 +02:00
Mateusz Pusz
a9bcec46c8
fix: static removed from a constexpr variable in a constexpr function as this is supported in C++23 only
2024-09-06 15:56:45 +02:00
Mateusz Pusz
1570bda905
fix: quantity scaling between different prefixes improved
...
Resolves #608
2024-09-06 12:28:11 +02:00
Mateusz Pusz
7eb9b764bd
fix: workarounds for not-working CWG2387
2024-09-05 22:05:35 +02:00
Mateusz Pusz
45013f6752
fix: inline restored for non-template constexpr global variables
2024-09-05 10:06:43 +02:00
Mateusz Pusz
2e840cfdb4
refactor: Repetitive inline constexpr removed as no longer needed
...
Not needed anymore as stated in cplusplus/draft#4601
2024-09-05 08:43:36 +02:00
Mateusz Pusz
f0e19d004c
fix: the remaining pascal macro conflicts fixed
...
Resolves #605
2024-08-25 17:31:58 +02:00
Mateusz Pusz
77625d63cb
feat: 💥 unit_can_be_prefixed removed - from now on all named units can be prefixed
...
Resolves #604
2024-08-22 08:06:00 +02:00
Mateusz Pusz
f983c31eb2
fix: workaround for linking issues on the older clang compilers
2024-07-30 16:07:45 +02:00
Chip Hogg
f088d544b3
Fix known errors
2024-07-29 20:43:06 -04:00
Chip Hogg
e2829de1c8
Merge branch 'master' into chiphogg/sqrt-mag#474
2024-07-29 20:36:40 -04:00
Mateusz Pusz
d04d546b17
fix: target_compile_definitions scope fixed for import std;
2024-07-29 10:04:07 +02:00
Chip Hogg
f6696e8f68
Fix formatting
2024-07-24 19:48:05 -04:00
Chip Hogg
7e894788d7
Compute values for rational magnitude powers
...
Since this will only ever be done at compile time (as guaranteed by
using `consteval`), we can afford to prioritize precision over speed.
To compute an Nth root, we simply do a binary search over representable
floating point numbers, looking for the number whose Nth power most
closely matches the original number.
Fixes #494 . We have included a test case reproducing the original
problem exactly. All tests use "within 4 ULPs" as the criterion, which
is (I believe) equivalent to the googletest `EXPECT_DOUBLE_EQ`
criterion.
2024-07-24 10:31:44 -04:00
Mateusz Pusz
f9ae701b4e
fix: MP_UNITS_BUILD_IMPORT_STD verification fixed
2024-07-17 21:31:28 +02:00
Mateusz Pusz
27bd2690bd
fix: preventing import std; in GMF
2024-07-16 20:50:04 +02:00
Mateusz Pusz
2411a7ef12
build: minimum required CMake version bumped to 3.25
...
Resolves #597
2024-07-16 20:35:05 +02:00
Mateusz Pusz
2e1e4f122a
chore: update CMakeLists.txt option description for building as system headers
2024-07-16 17:37:19 +02:00
Mateusz Pusz
b870b85c25
feat: import std; support added
...
Resolves #595
2024-07-16 17:36:00 +02:00
Mateusz Pusz
d51fb6d6c1
refactor: consistent std::size_t usage
2024-07-16 12:12:54 +02:00
Mateusz Pusz
fcc16ae282
feat: convertibility of a quantity with a unit one with the raw value added
...
Resolves #553
2024-07-14 18:31:11 +02:00
Mateusz Pusz
0dfd323c4b
feat: ValuePreservingTo extended with the explicit convertibility requirement
2024-07-14 18:06:02 +02:00
Mateusz Pusz
73f7901329
build: duplicated cmake_minimum_required commands removed
...
Resolves #592
2024-07-14 18:04:05 +02:00
Mateusz Pusz
e2a0e678a1
refactor: small cleanup in the quantity.h
2024-07-13 08:37:40 +02:00
Mateusz Pusz
fa25d11275
refactor: ValuePreservingTo concept added
2024-07-13 08:36:48 +02:00
Mateusz Pusz
498d895fe5
fix: designated initialization of extract_results removed to enable clang-16 compilation
2024-07-12 18:47:19 +02:00
Mateusz Pusz
adbc77432e
feat: all tags in the expression templates are now ordered by the type names
...
Resolves #499
2024-07-12 17:48:38 +02:00
Mateusz Pusz
f0e94e06da
fix: quantity_spec_interface_base introduced to fix the compilation on the older compilers
2024-07-12 17:10:30 +02:00
Mateusz Pusz
0010d868a7
feat: tag types-related operators are now hidden friends as well
...
Resolves #591
2024-07-12 16:01:03 +02:00
Mateusz Pusz
b5e8f2afcd
fix: si.h and angular.h now properly include hacks.h to define MP_UNITS_HOSTED before its usage
2024-07-12 15:03:19 +02:00
Mateusz Pusz
bc234b0093
fix: disabled partial convertibility of binary operators arguments
2024-07-12 15:02:29 +02:00
Mateusz Pusz
e5e0e47c36
refactor: small quantity and quantity_point interface cleanup
2024-07-11 20:06:00 +02:00
Mateusz Pusz
a70ef1ebc3
Revert "fix: disabled convertibility of quantity binary operators arguments"
...
This reverts commit 037964bbba .
2024-07-11 18:05:51 +02:00
Mateusz Pusz
037964bbba
fix: disabled convertibility of quantity binary operators arguments
2024-07-11 17:19:31 +02:00
Mateusz Pusz
50cc9dfded
refactor: binary operators of quantity and quantity_point are now hidden friends
2024-07-11 16:08:47 +02:00
Mateusz Pusz
c8849e5781
refactor: improvements in are_ingredients_convertible
2024-07-10 10:23:55 +02:00
Mateusz Pusz
390a0cee5d
refactor: small refactoring of conditions in convertible_impl
2024-07-08 09:12:16 +02:00
Mateusz Pusz
0586ce030b
refactor: prepend_and_process_rest refactored
2024-07-07 22:27:35 +01:00
Mateusz Pusz
382695623a
refactor: a few functions that look for convertible ingredeints renamed
2024-07-07 22:15:24 +01:00
Mateusz Pusz
0368d0a56d
fix: MP_UNITS_API_CONTRACTS should have a priority over headers availability (compat_macros)
2024-07-07 21:14:04 +01:00
Mateusz Pusz
6a5e6902fe
fix: MP_UNITS_API_CONTRACTS should have a priority over headers availability
2024-07-06 18:09:41 +01:00
Mateusz Pusz
b803e5b701
fix: most of the previous commit reverted (accidentaly too many files with changes were included)
2024-07-05 10:05:25 +01:00
Mateusz Pusz
c30f62e7f5
docs: 2.2.0 release announcement updated to point to 2.2.1
2024-07-04 22:57:49 +01:00
Mateusz Pusz
2cff579650
feat: representation type template parameter added to value convertion functions
...
Resolves #588
2024-07-04 22:05:40 +01:00
Mateusz Pusz
5903e5661f
refactor: 💥 quantity_point_like_traits now use numerical value instead of the quantity
...
Resolves #531
2024-07-04 16:40:40 +01:00
Mateusz Pusz
360eb85d09
docs: TODO note changed in the unit_symbol and dimension_symbol
2024-07-04 15:03:58 +01:00
Mateusz Pusz
170a345fdf
fix: unit_symbol and dimension_symbol fixed for pre-C++23 compilation
2024-07-04 14:46:14 +01:00