forked from mpusz/mp-units
clang-format applied to type_list
This commit is contained in:
17
src/include/units/bits/external/type_list.h
vendored
17
src/include/units/bits/external/type_list.h
vendored
@@ -51,7 +51,7 @@ namespace units {
|
|||||||
using type = List<NewTypes..., OldTypes...>;
|
using type = List<NewTypes..., OldTypes...>;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
} // namespace detail
|
||||||
|
|
||||||
template<TypeList List, typename... Types>
|
template<TypeList List, typename... Types>
|
||||||
using type_list_push_front = detail::type_list_push_front_impl<List, Types...>::type;
|
using type_list_push_front = detail::type_list_push_front_impl<List, Types...>::type;
|
||||||
@@ -68,7 +68,7 @@ namespace units {
|
|||||||
using type = List<OldTypes..., NewTypes...>;
|
using type = List<OldTypes..., NewTypes...>;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
} // namespace detail
|
||||||
|
|
||||||
template<TypeList List, typename... Types>
|
template<TypeList List, typename... Types>
|
||||||
using type_list_push_back = detail::type_list_push_back_impl<List, Types...>::type;
|
using type_list_push_back = detail::type_list_push_back_impl<List, Types...>::type;
|
||||||
@@ -87,7 +87,7 @@ namespace units {
|
|||||||
using type = type_list_join_impl<List<First..., Second...>, Rest...>::type;
|
using type = type_list_join_impl<List<First..., Second...>, Rest...>::type;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
} // namespace detail
|
||||||
|
|
||||||
template<TypeList... Lists>
|
template<TypeList... Lists>
|
||||||
using type_list_join = detail::type_list_join_impl<Lists...>::type;
|
using type_list_join = detail::type_list_join_impl<Lists...>::type;
|
||||||
@@ -160,16 +160,17 @@ namespace units {
|
|||||||
struct type_list_merge_sorted_impl<List<Lhs1, LhsRest...>, List<Rhs1, RhsRest...>, Pred> {
|
struct type_list_merge_sorted_impl<List<Lhs1, LhsRest...>, List<Rhs1, RhsRest...>, Pred> {
|
||||||
using type = conditional<
|
using type = conditional<
|
||||||
Pred<Lhs1, Rhs1>::value,
|
Pred<Lhs1, Rhs1>::value,
|
||||||
typename type_list_push_front_impl<typename type_list_merge_sorted_impl<List<LhsRest...>, List<Rhs1, RhsRest...>, Pred>::type, Lhs1>::type,
|
typename type_list_push_front_impl<
|
||||||
typename type_list_push_front_impl<typename type_list_merge_sorted_impl<List<Lhs1, LhsRest...>, List<RhsRest...>, Pred>::type, Rhs1>::type>;
|
typename type_list_merge_sorted_impl<List<LhsRest...>, List<Rhs1, RhsRest...>, Pred>::type, Lhs1>::type,
|
||||||
|
typename type_list_push_front_impl<
|
||||||
|
typename type_list_merge_sorted_impl<List<Lhs1, LhsRest...>, List<RhsRest...>, Pred>::type, Rhs1>::type>;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
} // namespace detail
|
||||||
|
|
||||||
template<TypeList SortedList1, TypeList SortedList2, template<typename, typename> typename Pred>
|
template<TypeList SortedList1, TypeList SortedList2, template<typename, typename> typename Pred>
|
||||||
using type_list_merge_sorted = detail::type_list_merge_sorted_impl<SortedList1, SortedList2, Pred>::type;
|
using type_list_merge_sorted = detail::type_list_merge_sorted_impl<SortedList1, SortedList2, Pred>::type;
|
||||||
|
|
||||||
|
|
||||||
// sort
|
// sort
|
||||||
|
|
||||||
namespace detail {
|
namespace detail {
|
||||||
@@ -196,7 +197,7 @@ namespace units {
|
|||||||
using type = type_list_merge_sorted_impl<sorted_left, sorted_right, Pred>::type;
|
using type = type_list_merge_sorted_impl<sorted_left, sorted_right, Pred>::type;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
} // namespace detail
|
||||||
|
|
||||||
template<TypeList List, template<typename, typename> typename Pred>
|
template<TypeList List, template<typename, typename> typename Pred>
|
||||||
using type_list_sort = detail::type_list_sort_impl<List, Pred>::type;
|
using type_list_sort = detail::type_list_sort_impl<List, Pred>::type;
|
||||||
|
Reference in New Issue
Block a user