fix: expression template simplification bug fixed

This commit is contained in:
Mateusz Pusz
2022-11-05 18:45:02 +01:00
parent 4938e9d5c0
commit f1caad7b74

View File

@@ -237,8 +237,8 @@ template<typename T, typename... NRest, typename... DRest, int... Ints, template
struct expr_simplify<type_list<T, NRest...>, type_list<power<T, Ints...>, DRest...>, Pred> { struct expr_simplify<type_list<T, NRest...>, type_list<power<T, Ints...>, DRest...>, Pred> {
using impl = expr_simplify<type_list<NRest...>, type_list<DRest...>, Pred>; using impl = expr_simplify<type_list<NRest...>, type_list<DRest...>, Pred>;
using type = expr_simplify_power<T, ratio{1}, power<T, Ints...>::exponent>; using type = expr_simplify_power<T, ratio{1}, power<T, Ints...>::exponent>;
using num = type_list_join<typename impl::num, typename type::num>; using num = type_list_join<typename type::num, typename impl::num>;
using den = type_list_join<typename impl::den, typename type::den>; using den = type_list_join<typename type::den, typename impl::den>;
}; };
// in case there are different powers for the same element simplify the power // in case there are different powers for the same element simplify the power