refactor: Forward declaration of as_magnitude() is not needed

This commit is contained in:
Mateusz Pusz
2022-01-18 12:16:18 +01:00
parent 30b7250033
commit 8493bf389e

View File

@@ -241,16 +241,6 @@ static constexpr bool is_magnitude<magnitude<BPs...>> = true;
template<typename T> template<typename T>
concept Magnitude = detail::is_magnitude<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. * @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; static constexpr auto prime_factorization_v = prime_factorization<N>::value;
} // namespace detail } // 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> template<ratio R>
requires (R.num > 0) requires (R.num > 0)
constexpr Magnitude auto as_magnitude() { constexpr Magnitude auto as_magnitude() {