Commit Graph
1229 Commits
Author SHA1 Message Date
Mateusz Pusz 7102a4f63d fix: previous commit put MSVC code in an incorrect scope 2025-02-15 18:41:50 +01:00
Mateusz Pusz 8454949adb build: silenced MSVC warning for #include in a module purview 2025-02-15 18:19:57 +01:00
Mateusz Pusz 8eef11144b refactor: branch with constant condition changed to if constexpr 2025-02-15 14:29:52 +01:00
Mateusz Pusz a6c8130f88 fix: MSVC complained about the usage of deprecated member 2025-02-15 14:29:24 +01:00
Mateusz Pusz dc8843eeeb refactor: MSVC bug is fixed so workaround is removed 2025-02-15 10:39:36 +01:00
Mateusz Pusz 014458864c fix: std::numeric_limits usage fixed 2025-02-13 19:48:13 +01:00
Mateusz Pusz 5a0e350be7 feat: lerp and midpoint for points added 2025-02-13 14:26:51 +01:00
Mateusz Pusz 7d340d9098 fix: appleclang-15 timeout on compilation workaround 2025-02-12 19:21:24 +01:00
Mateusz Pusz ded736a422 style: pre-commit 2025-02-12 19:11:27 +01:00
Mateusz Pusz 4b1f7cd217 feat: 💥 Representation concept removed 2025-02-12 18:57:06 +01:00
Mateusz Pusz 5963a2eb87 refactor: 💥 MagConstant concept renamed to detail::is_mag_constant variable trait 2025-02-12 09:51:14 +01:00
Mateusz Pusz 47cd2fffcc refactor: math_concepts.h removed and concepts replaced with explicit expression in constraints 2025-02-12 08:40:06 +01:00
Mateusz Pusz e9c5f7236e feat: ConvertibleWithNumber introduced to improve convertibility of unit one with raw numbers
Resolves #675
2025-02-11 21:28:15 +01:00
Mateusz Pusz 47a82f466c refactor: scalar and complex renamed to real_scalar and complex_scalar respectively + concepts refactoring + electromagnetism fixes 2025-02-11 17:26:19 +01:00
Mateusz Pusz fa482c9246 feat: deprecation messages now provide the release version where the deprecation happened 2025-02-11 10:07:34 +01:00
Mateusz Pusz c6e95a9fc7 refactor: limits.h removed and the contents moved to quantity.h and quantity_point.h
Resolves #673
2025-02-06 17:16:12 +01:00
Mateusz Pusz 51559d094b refactor: might_store_converted_value refactored to overflows_non_zero_values 2025-02-06 16:55:37 +01:00
Mateusz Pusz d5a846af3d fix: MSVC compilation fixed 2025-02-06 16:21:47 +01:00
Mateusz Pusz 5d4e1aa740 feat: might_store_converted_common_value added to detect conversions overflowing rep
Resolves #670, resolves #671, resolves #658, resolves #303
2025-02-06 15:28:55 +01:00
Mateusz Pusz 88439828a5 feat: std::numeric_limits support added
Resolves #408
2025-02-05 18:04:43 +01:00
Mateusz Pusz b8855dc7ba fix: floor and ceil constaints fixed 2025-02-05 17:27:32 +01:00
Mateusz Pusz 8d2dddb8b6 refactor: less, ceil, and round refactored and improved + more unit tests for round
Resolves #672
2025-02-05 12:10:36 +01:00
Mateusz Pusz 0b14d69539 feat: quantity::one() removed
Related to #408
2025-02-05 12:08:32 +01:00
Mateusz Pusz becb456da5 fix: missing get_common_unit() overload added
Resolves #666
2025-01-21 12:37:54 +01:00
Mateusz Pusz b2dbc1e69a refactor: std::convertible_to replaced with std::same_as in basic_fixed_string 2025-01-13 19:18:52 +01:00
Mateusz Pusz 0ba48b72f4 fix: make_quantity_point constraints fixed 2025-01-10 23:05:36 +01:00
Mateusz Pusz c7b822ec54 fix: point_origin_interface::op+ constraints fixed 2025-01-10 22:59:56 +01:00
Mateusz Pusz 3bac7a4876 fix: inverse(Quantity) fixed for subkinds of dimensionless 2025-01-10 22:50:26 +01:00
Mateusz Pusz e15205e47c refactor: point_origin_interface::op+ return type unified with the rest of the interfaces 2025-01-09 14:01:39 +01:00
Mateusz Pusz 7ed5707e31 refactor: make_quantity_point introduced 2025-01-09 13:46:42 +01:00
Mateusz Pusz 2d10a30d27 fix: compile-time branch condition fixed in quantity_point::point_for 2025-01-09 13:44:21 +01:00
FrancoisCarouge 9adfa6ea43 fix: quantity_spec missing lint block end 2024-12-30 12:31:53 -08:00
Mateusz Pusz 6f0a81ac80 fix: unit_symbol() and dimension_symbol() returns now std::basic_string_view<CharT> 2024-12-29 11:01:43 +01:00
Mateusz Pusz e94df6e895 fix: unused convertible_kinds() argument removed 2024-12-28 22:23:38 +01:00
Mateusz Pusz 814f937e03 fix: MSVC build fixed 2024-12-28 22:19:35 +01:00
Mateusz Pusz dd6f29b65e fix: std::tuple is not freestanding on gcc-14 with C++23 2024-12-28 21:00:08 +01:00
Mateusz Pusz 5382e08fdd fix: compilation fixed after rebase 2024-12-28 14:12:28 +01:00
Mateusz Pusz a9525fa301 fix: inconsistencies in get_common_quantity_spec() fixed 2024-12-28 14:02:22 +01:00
Mateusz Pusz 71917a41dc refactor: inverse() constraints improved 2024-12-28 14:02:22 +01:00
Mateusz Pusz 06cbfae3b3 feat: quantity_spec conversions improved 2024-12-28 14:02:03 +01:00
Mateusz Pusz b685521a18 Revert "refactor: QuantitySpec convertibility concepts replaced with direct function calls"
This reverts commit 09488409d2.
2024-12-28 13:52:24 +01:00
Mateusz Pusz 146d7a32fb Merge branch 'master' of github.com:mpusz/units 2024-12-28 13:50:10 +01:00
Roth MichaelsandMateusz Pusz 90aa52a6cc Update src/core/include/mp-units/framework/representation_concepts.h
Co-authored-by: Mateusz Pusz <mateusz.pusz@gmail.com>
2024-12-19 11:21:17 -05:00
Roth Michaels ada508a683 Do not use WeaklyRegular with Xcode 15 for type detection
Removing the `WeaklyRegular` requirement from the `Scalar`, `Complex`,
and `Vector` concepts seems to address compiler crashes or long
compilation times with apple-clang included in Xcode 15.

I thought I had previously tried removing the `WeaklyRegular`
requirement and it had not solved the problem but either I made a
mistake with this test or some other changes after rebasing this work
changed the situation.
2024-12-19 11:19:09 -05:00
Roth MichaelsandMateusz Pusz 0c3bb98c6d Update src/core/include/mp-units/framework/representation_concepts.h
Co-authored-by: Mateusz Pusz <mateusz.pusz@gmail.com>
2024-12-09 18:11:03 +01:00
Roth MichaelsandMateusz Pusz ec3f000050 Update src/core/include/mp-units/framework/representation_concepts.h
Co-authored-by: Mateusz Pusz <mateusz.pusz@gmail.com>
2024-12-09 18:10:56 +01:00
Roth Michaels d30f5a668c clang-format fixes 2024-12-09 18:01:27 +01:00
Roth Michaels c3e45088a6 Fixes for apple-clang crashes and performance issues
The source of the crash with the latest changes seemed to be from the
`IsOfCharacter` concept.  This concept was refactored to use some type
traits and more simple concepts although with less strict requirements.

A new macro, `MP_UNITS_APPLE_CLANG_HACKS` was added to
mp-units/bits/hacks.h to enable work arounds for pre-Xcode 16.1 apple-clang.

Some tests were not passing and were removed with the preprocessor macro
for apple-clang hacks is defined.

Adding `ComplexFunctionsAvailable` and `VectorFunctionsAvailable` fixed
some test failures in concepts_test.cpp but not all.
2024-12-09 17:39:21 +01:00
Mateusz Pusz 09488409d2 refactor: QuantitySpec convertibility concepts replaced with direct function calls 2024-12-09 15:55:21 +01:00
Mateusz Pusz 7eab29c40a fix: gcc-12 compilation workaround 2024-12-04 21:14:17 +01:00