Commit Graph
934 Commits
Author SHA1 Message Date
Mateusz Pusz e3f641c2bb fix: LA support fixed 2023-05-12 11:48:33 +02:00
Mateusz Pusz 760c6d724e fix: incorrect unit of pow(), sqrt(), and cbrt() fixed
Resolves #449
2023-04-08 19:33:00 +02:00
Mateusz Pusz 56dcb716e3 fix: some preprocessor branches fixed 2023-03-30 17:04:25 +02:00
Mateusz Pusz 99283dce1c fix: a workaround for compilation error on MSVC and gcc-10 added 2023-03-30 13:34:06 +02:00
Mateusz Pusz 33d9f43b0f style: clang-format-16 applied to all the code base 2023-03-29 17:05:02 +02:00
Cazadorro 03dc1c8a3c Added check for gsl::gsl-lite to avoid find_package if targets already added by add_subdirectory(...) and did the same for fmt::fmt and ranges-v3, with out these changes, impossible to use library if dependencies are also subdirectories 2023-03-13 14:56:42 -05:00
Johel Ernesto Guerrero Peña fbbddb9e7b refactor: update hacks for LLVM 17 2023-03-04 14:28:37 -04:00
Yves Delley a6901a17e8 double check MSVC fix 2022-12-31 14:20:29 +01:00
Yves Delley 02f6f36aeb one more attempt at fixing the MSVC failures 2022-12-31 12:51:30 +01:00
Yves Delley b6da63b2f0 refactor macros to start with UNITS_ and fix an MSVC issue with FMT_THROW 2022-12-30 17:22:04 +01:00
Yves Delley c346ee123a add missing throws in format.h; undo change to core.h 2022-12-13 18:03:20 +01:00
Yves Delley 4603d24f2c recfactor: use FMT_THROW inside fmt.h to make code embedded-friendly 2022-12-13 17:45:00 +01:00
Mateusz Pusz 60cec6020b fix: MSVC-193 compilation issue workaround
Closes #403
2022-12-01 20:15:52 +01:00
Markus Hofbauer ca9c880c50 apply clang format 2022-11-17 16:25:58 +01:00
TheCoconutChef 136af48e70 fix: constraint recursion for gcc11 on operator/
A similar fix was applied in 417f842585
for the operator*.

Following discussion in https://github.com/mpusz/units/issues/398, it
seems appropriate to apply it for operator/.

Other operators (+, -, %) do not seem to suffer from the same problem.
2022-10-20 12:00:18 -04:00
Johel Ernesto Guerrero Peña a4183739ad refactor: make typename optional for Clang 16 2022-10-01 10:12:35 -04:00
Mateusz Pusz 6bc54819f3 fix: 💥 standard_gravity removed from si2019 namespace as it is not an SI defining constant 2022-09-15 11:49:37 -06:00
Mateusz Pusz c96e88e1be Merge branch 'master' of github.com:mpusz/units 2022-09-12 18:00:36 -06:00
Chip Hogg 06b3a64252 Replace compile-time exceptions with terminations
This appears to cause problems under `-fno-exceptions` in some rare instances.

Should fix #390.
2022-09-12 00:34:45 +00:00
Mateusz Pusz 22c26e62c6 refactor: prefixes refactored to benefit from mag_power() 2022-09-11 19:47:31 +02:00
Mateusz Pusz d0eceefe80 refactor: dead ratio code removed 2022-09-06 23:49:16 +02:00
Mateusz Pusz 1238cc17c2 refactor: treat_as_floating_point constraint added for Rep in the trigonometric functions 2022-09-05 12:20:57 +02:00
Mateusz Pusz abc429a71a refactor: rotation angle unit renamed to revolution 2022-09-05 12:12:12 +02:00
Mateusz Pusz 520c944971 feat: 💥 reduced_planck constant removed as it is unclear if it should be angular or not (leave the choice to the user) 2022-09-03 12:29:58 +02:00
Mateusz Pusz bb453e4a8a feat: cotes_angle constant added 2022-09-03 12:28:38 +02:00
Mateusz Pusz 9ae3403b18 feat: trigonometric functions on quantities support added 2022-09-01 16:25:11 +02:00
Mateusz Pusz 1096d8d8ba fix: luminous flux support fixed 2022-09-01 12:18:18 +02:00
Mateusz Pusz e40a5d631c feat: solid angle support added 2022-09-01 12:16:47 +02:00
Mateusz Pusz a92a315bda feat: angular acceleration support added 2022-09-01 12:05:20 +02:00
Mateusz Pusz 1cb9d35d66 fix: radian_per_second unit symbol fixed 2022-09-01 12:02:45 +02:00
Mateusz Pusz 7719776711 feat: gradian support added 2022-09-01 10:48:34 +02:00
Mateusz Pusz c1d23b41c1 refactor: pi-based magnitude renamed to mag_pi 2022-09-01 10:47:36 +02:00
Mateusz Pusz 9891eab82b refactor: radian restored to be the reference unit for angle 2022-09-01 10:45:53 +02:00
Mateusz Pusz 74f442d316 refactor: quantity_ratio removed as it is no longer used by the framework 2022-08-31 21:23:01 +02:00
Mateusz Pusz dac7f81a67 fix: harmonic_ concept fixed to properly account for pi-based magnitudes 2022-08-31 21:12:00 +02:00
Mateusz Pusz 8b534c8d8b feat: degrees and rotations support added
Resolves #370
2022-08-31 12:57:24 +02:00
Mateusz Pusz 1b9cd8446c refactor: ipow10() and fpow10() removed as they are no longer used
Resolves #311
2022-08-31 10:53:13 +02:00
Mateusz Pusz d4f1e93d6c Merge pull request #375 from chiphogg/chiphogg/docs
Update prefix documentation
2022-08-23 10:28:30 +02:00
Björn Schäpers 9c514439d1 Fix: 32 bit overflow
../units/src/core/include/units/magnitude.h: In instantiation of 'static constexpr intmax_t units::detail::prime_factorization<N>::get_or_compute_first_factor() [with long long int N = 149597870700; intmax_t = long long int]':
../units/src/core/include/units/magnitude.h:627:74:   required from 'constexpr const intmax_t units::detail::prime_factorization<149597870700>::first_base'
../units/src/core/include/units/magnitude.h:632:54:   required from 'constexpr const auto units::detail::prime_factorization<149597870700>::value'
../units/src/core/include/units/magnitude.h:631:25:   required from 'struct units::detail::prime_factorization<149597870700>'
../units/src/core/include/units/magnitude.h:642:71:   required from 'constexpr const auto units::detail::prime_factorization_v<149597870700>'
../units/src/core/include/units/magnitude.h:655:18:   required from 'constexpr auto [requires units::Magnitude<<placeholder>, >] units::mag() [with ratio R = ratio{149597870700, 1}]'
../units/src/systems/si/include/units/isq/si/length.h:59:91:   required from here
../units/src/core/include/units/magnitude.h:623:70: error: unsigned conversion from 'long long int' to 'std::size_t' {aka 'unsigned int'} changes value from '149597870700' to '3568982636' [-Werror=overflow]
  623 |       return static_cast<std::intmax_t>(factorizer::find_first_factor(N));
      |                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
2022-08-10 08:37:55 +02:00
Björn Schäpers cce0d2c12b Supress "zero as null pointer constant" warning 2022-08-10 08:18:30 +02:00
Björn Schäpers d1130c9d39 Suppress float-equal warning 2022-08-09 16:38:29 +02:00
Chip Hogg 10b553bdbe Adapt Aurora's Magnitude docs for mp-units
The major missing work here is to see how the latex math, inside dollar
signs, translates to the docs.

I also added a new constant, `pi`, to make the docs correct: this should
be much more user friendly.

This is not intended to be "complete".  Rather, the goal is to deliver
the raw content so that experts can massage it.
2022-08-04 19:13:53 +00:00
Mateusz Pusz 4e044c4e43 refactor: hypot was overconstrained 2022-08-03 13:51:18 +02:00
Mateusz Pusz 4313df390c refactor: hypot refactored to use variadic common_type version 2022-08-03 13:34:45 +02:00
Mateusz Pusz dd4679459d feat: hypot support added 2022-08-03 12:29:49 +02:00
Mateusz Pusz 9aa3fd4d00 fix: prefixed_alias_unit constraints fixed 2022-08-03 11:29:20 +02:00
Mateusz Pusz 9944de10f9 ci: fmt dependency checked only when UNITS_USE_LIBFMT is set 2022-08-02 15:10:21 +02:00
Mateusz Pusz 0ebf85b9db fix: unknown_coherent_unit fixed 2022-08-01 11:59:00 +02:00
Mateusz Pusz bb5c02e09e fix: Quantity inversion operation fixed
Resolves #367
2022-08-01 10:03:55 +02:00
Mateusz Pusz 5bd378a835 refactor: base_units_ratio.h renamed to absolute_magnitude.h 2022-07-31 15:45:40 +02:00