fix: missing TYPENAMEs added

This commit is contained in:
Mateusz Pusz
2022-12-16 18:17:06 +01:00
parent c266db9c24
commit 7889ab8f05

View File

@@ -173,24 +173,24 @@ struct expr_consolidate_impl<type_list<T, Rest...>> {
template<typename T, typename... Rest> template<typename T, typename... Rest>
requires(!is_specialization_of_power<T>) requires(!is_specialization_of_power<T>)
struct expr_consolidate_impl<type_list<T, T, Rest...>> { struct expr_consolidate_impl<type_list<T, T, Rest...>> {
using type = expr_consolidate_impl<type_list<power<T, 2>, Rest...>>::type; using type = TYPENAME expr_consolidate_impl<type_list<power<T, 2>, Rest...>>::type;
}; };
// replaces the instance of a type and a power of it with one with incremented power // replaces the instance of a type and a power of it with one with incremented power
template<typename T, int... Ints, typename... Rest> template<typename T, int... Ints, typename... Rest>
struct expr_consolidate_impl<type_list<T, power<T, Ints...>, Rest...>> { struct expr_consolidate_impl<type_list<T, power<T, Ints...>, Rest...>> {
using type = expr_consolidate_impl<type_list<power_or_T<T, power<T, Ints...>::exponent + 1>, Rest...>>::type; using type = TYPENAME expr_consolidate_impl<type_list<power_or_T<T, power<T, Ints...>::exponent + 1>, Rest...>>::type;
}; };
// accumulates the powers of instances of the same type (removes the element in case the accumulation result is `0`) // accumulates the powers of instances of the same type (removes the element in case the accumulation result is `0`)
template<typename T, int... Ints1, int... Ints2, typename... Rest> template<typename T, int... Ints1, int... Ints2, typename... Rest>
struct expr_consolidate_impl<type_list<power<T, Ints1...>, power<T, Ints2...>, Rest...>> { struct expr_consolidate_impl<type_list<power<T, Ints1...>, power<T, Ints2...>, Rest...>> {
static constexpr ratio r = power<T, Ints1...>::exponent + power<T, Ints2...>::exponent; static constexpr ratio r = power<T, Ints1...>::exponent + power<T, Ints2...>::exponent;
using type = typename expr_consolidate_impl<type_list<power_or_T<T, r>, Rest...>>::type; using type = TYPENAME expr_consolidate_impl<type_list<power_or_T<T, r>, Rest...>>::type;
}; };
template<typename List> template<typename List>
using expr_consolidate = typename expr_consolidate_impl<List>::type; using expr_consolidate = TYPENAME expr_consolidate_impl<List>::type;
/** /**