forked from mpusz/mp-units
Merge branch 'master' into mag-value-t
This commit is contained in:
@@ -47,7 +47,7 @@ constexpr ratio inverse_if_negative(const ratio& r)
|
||||
template<Unit... Us, typename... Es>
|
||||
constexpr ratio derived_ratio(exponent_list<Es...>)
|
||||
{
|
||||
return (... * inverse_if_negative<Es>(pow<detail::abs(Es::num)>(Us::ratio) / dimension_unit<typename Es::dimension>::ratio));
|
||||
return (... * inverse_if_negative<Es>(pow<detail::abs(Es::num)>(Us::ratio / dimension_unit<typename Es::dimension>::ratio)));
|
||||
}
|
||||
|
||||
template<DerivedDimension D, Unit... Us>
|
||||
|
||||
+4
-9
@@ -63,18 +63,13 @@
|
||||
#define UNITS_DIAGNOSTIC_IGNORE_UNREACHABLE UNITS_DIAGNOSTIC_IGNORE(4702)
|
||||
#endif
|
||||
|
||||
#if UNITS_COMP_CLANG
|
||||
|
||||
#include <ciso646>
|
||||
#if _LIBCPP_VERSION
|
||||
#define UNITS_LIBCXX _LIBCPP_VERSION
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#if UNITS_LIBCXX
|
||||
|
||||
#if UNITS_COMP_CLANG == 12
|
||||
#if UNITS_LIBCXX < 13000
|
||||
|
||||
#include <concepts/concepts.hpp>
|
||||
#include <range/v3/algorithm/lower_bound.hpp>
|
||||
@@ -84,7 +79,7 @@
|
||||
#include <range/v3/iterator/concepts.hpp>
|
||||
#include <range/v3/range/concepts.hpp>
|
||||
|
||||
#elif UNITS_COMP_CLANG == 13
|
||||
#elif UNITS_LIBCXX < 14000
|
||||
|
||||
#include <range/v3/functional/comparisons.hpp>
|
||||
|
||||
@@ -115,7 +110,7 @@ concept default_constructible = constructible_from<T>;
|
||||
|
||||
#elif UNITS_LIBCXX
|
||||
|
||||
#if UNITS_COMP_CLANG == 12
|
||||
#if UNITS_LIBCXX < 13000
|
||||
|
||||
// concepts
|
||||
using concepts::common_with;
|
||||
@@ -228,7 +223,7 @@ constexpr bool in_range(T t) noexcept
|
||||
std::cmp_less_equal(t, std::numeric_limits<R>::max());
|
||||
}
|
||||
|
||||
#elif UNITS_COMP_CLANG == 13
|
||||
#elif UNITS_LIBCXX < 14000
|
||||
|
||||
using concepts::three_way_comparable;
|
||||
using concepts::three_way_comparable_with;
|
||||
|
||||
@@ -363,16 +363,6 @@ concept Magnitude = detail::is_magnitude<T>;
|
||||
template<typename T>
|
||||
T get_value(Magnitude auto m) { return m.template value<T>; }
|
||||
|
||||
/**
|
||||
* @brief Convert any positive integer to a Magnitude.
|
||||
*
|
||||
* This will be the main way end users create Magnitudes. They should rarely (if ever) create a magnitude<...> by
|
||||
* manually adding base powers.
|
||||
*/
|
||||
template<ratio R>
|
||||
requires (R.num > 0)
|
||||
constexpr Magnitude auto as_magnitude();
|
||||
|
||||
/**
|
||||
* @brief A base to represent pi.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user