mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-03 12:24:26 +02:00
feat: per
and power
made final
This commit is contained in:
@@ -70,7 +70,7 @@ struct type_list {};
|
|||||||
* @note Can't be empty
|
* @note Can't be empty
|
||||||
*/
|
*/
|
||||||
template<detail::SymbolicArg T, detail::SymbolicArg... Ts>
|
template<detail::SymbolicArg T, detail::SymbolicArg... Ts>
|
||||||
struct per {};
|
struct per final {};
|
||||||
|
|
||||||
namespace detail {
|
namespace detail {
|
||||||
|
|
||||||
@@ -118,7 +118,7 @@ constexpr bool ratio_one<N, N> = true;
|
|||||||
*/
|
*/
|
||||||
template<detail::SymbolicArg F, int Num, int... Den>
|
template<detail::SymbolicArg F, int Num, int... Den>
|
||||||
requires(detail::valid_ratio<Num, Den...> && detail::positive_ratio<Num, Den...> && !detail::ratio_one<Num, Den...>)
|
requires(detail::valid_ratio<Num, Den...> && detail::positive_ratio<Num, Den...> && !detail::ratio_one<Num, Den...>)
|
||||||
struct power {
|
struct power final {
|
||||||
using factor = F;
|
using factor = F;
|
||||||
static constexpr detail::ratio exponent{Num, Den...};
|
static constexpr detail::ratio exponent{Num, Den...};
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user