refactor: Unused code commented for now

This commit is contained in:
Mateusz Pusz
2022-09-16 17:38:40 -06:00
parent 2f365b5135
commit 2d5386504d

View File

@@ -83,30 +83,30 @@ template<typename T, int Num, int Den>
using power_or_T = decltype(power_or_T_impl<T, Num, Den>()); using power_or_T = decltype(power_or_T_impl<T, Num, Den>());
// type_power // type_power
template<typename T, int Num, int Den> // template<typename T, int Num, int Den>
struct type_power { // struct type_power {
using type = conditional<Den == 1, power<T, Num>, power<T, Num, Den>>; // using type = conditional<Den == 1, power<T, Num>, power<T, Num, Den>>;
}; // };
template<typename T, int Num2, int Num> // template<typename T, int Num2, int Num>
struct type_power<power<T, Num2>, Num, 1> { // struct type_power<power<T, Num2>, Num, 1> {
using type = power<T, Num * Num2>; // using type = power<T, Num * Num2>;
}; // };
template<typename T, int Num, int Den, int... Ints> // template<typename T, int Num, int Den, int... Ints>
struct type_power<power<T, Ints...>, Num, Den> { // struct type_power<power<T, Ints...>, Num, Den> {
static constexpr ratio r = ratio(power<T, Ints...>::num, power<T, Ints...>::den) * ratio(Num, Den); // static constexpr ratio r = ratio(power<T, Ints...>::num, power<T, Ints...>::den) * ratio(Num, Den);
using type = power_or_T<T, r.num, r.den>; // using type = power_or_T<T, r.num, r.den>;
}; // };
// expr_power // expr_power
template<typename List, int Num, int Den> // template<typename List, int Num, int Den>
struct expr_power; // struct expr_power;
template<typename... Ts, int Num, int Den> // template<typename... Ts, int Num, int Den>
struct expr_power<type_list<Ts...>, Num, Den> { // struct expr_power<type_list<Ts...>, Num, Den> {
using type = type_list<typename type_power<Ts, Num, Den>::type...>; // using type = type_list<typename type_power<Ts, Num, Den>::type...>;
}; // };
/** /**
* @brief Consolidates contiguous ranges of exponents of the same dimension * @brief Consolidates contiguous ranges of exponents of the same dimension