Skip to content

Commit

Permalink
etl/type_traits.h: Add support for type_identity
Browse files Browse the repository at this point in the history
  • Loading branch information
tigran2008 committed Jun 10, 2024
1 parent bb71b60 commit 3805cb7
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
11 changes: 11 additions & 0 deletions include/etl/generators/type_traits_generator.h
Original file line number Diff line number Diff line change
Expand Up @@ -2295,6 +2295,17 @@ typedef integral_constant<bool, true> true_type;
template <typename T>
using signed_type_t = typename signed_type<T>::type;
#endif

//*********************************************
// type_identity

template <typename T>
struct type_identity { typedef T type; };

#if ETL_USING_CPP11
template <typename T>
using type_identity_t = typename type_identity<T>::type;
#endif
}

// Helper macros
Expand Down
11 changes: 11 additions & 0 deletions include/etl/type_traits.h
Original file line number Diff line number Diff line change
Expand Up @@ -2288,6 +2288,17 @@ typedef integral_constant<bool, true> true_type;
template <typename T>
using signed_type_t = typename signed_type<T>::type;
#endif

//*********************************************
// type_identity

template <typename T>
struct type_identity { typedef T type; };

#if ETL_USING_CPP11
template <typename T>
using type_identity_t = typename type_identity<T>::type;
#endif
}

// Helper macros
Expand Down

0 comments on commit 3805cb7

Please sign in to comment.