mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-04 12:54:25 +02:00
refactor: Forward declaration of as_magnitude()
is not needed
This commit is contained in:
@@ -241,16 +241,6 @@ static constexpr bool is_magnitude<magnitude<BPs...>> = true;
|
||||
template<typename T>
|
||||
concept Magnitude = detail::is_magnitude<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.
|
||||
*/
|
||||
@@ -349,6 +339,12 @@ template<std::intmax_t N>
|
||||
static constexpr auto prime_factorization_v = prime_factorization<N>::value;
|
||||
} // namespace detail
|
||||
|
||||
/**
|
||||
* @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() {
|
||||
|
Reference in New Issue
Block a user