Skip to content

Commit

Permalink
feat(mpl): add typename for portability
Browse files Browse the repository at this point in the history
  • Loading branch information
Codesire-Deng committed Oct 24, 2023
1 parent 2da602a commit 106d3e6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions include/co_context/mpl/type_list.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ template<TL in, template<typename> typename P>
struct remove_if {
private:
template<typename E>
using not_P = detail::negate<P>::template type<E>;
using not_P = typename detail::negate<P>::template type<E>;

public:
using type = filter_t<in, not_P>;
Expand Down Expand Up @@ -452,14 +452,14 @@ struct reverse_sequence<std::integer_sequence<T>> {
template<typename T, T idx, T... idxs>
struct reverse_sequence<std::integer_sequence<T, idx, idxs...>> {
template<T... app>
using append = reverse_sequence<
using append = typename reverse_sequence<
std::integer_sequence<T, idxs...>>::template append<idx, app...>;
using type = reverse_sequence<
using type = typename reverse_sequence<
std::integer_sequence<T, idxs...>>::template append<idx>;
};

template<typename T>
using reverse_sequence_t = reverse_sequence<T>::type;
using reverse_sequence_t = typename reverse_sequence<T>::type;

static_assert(std::is_same_v<
reverse_sequence_t<std::integer_sequence<int, 0, 10, 3, 7>>,
Expand Down

0 comments on commit 106d3e6

Please sign in to comment.