Skip to content

Commit

Permalink
-added to_type_id_tuple helper for type_list;
Browse files Browse the repository at this point in the history
  • Loading branch information
kamchatka-volcano committed Aug 22, 2024
1 parent 04cb78a commit 95c3948
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
8 changes: 8 additions & 0 deletions include/sfun/type_list.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,14 @@ struct to_tuple<type_list<Args...>> {
template<typename T>
using to_tuple_t = typename to_tuple<T>::type;

template<typename... Args>
struct to_type_id_tuple<type_list<Args...>> {
using type = std::tuple<type_identity<Args>...>;
};

template<typename T>
using to_type_id_tuple_t = typename to_type_id_tuple<T>::type;

} //namespace sfun

#endif //SFUN_TYPE_LIST_H
3 changes: 3 additions & 0 deletions include/sfun/type_traits.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ using type_identity_t = typename type_identity<T>::type;
template<typename T, typename... Args>
struct to_tuple {};

template<typename T, typename... Args>
struct to_type_id_tuple {};

template<typename T, typename... Args>
struct decay_tuple {};

Expand Down

0 comments on commit 95c3948

Please sign in to comment.