stdtype_identity(3)
std::type_identity - std::type_identity
Synopsis
Defined in header<type_traits>
template <class T>
(since C++ 20)
struct type_identity;Provides the member typedef type that names T (i.e., the identity transformation).
Member types
Name Definition type T
Helper types
template< class T > (since C++20) using type_identity_t = typename type_identity<T>::type;
Possible implementation
Notes
type_identity can be used to block template_argument_deduction:
template <class T>
void f(T, T);
template <class T>
void g(T, std::type_identity_t<T>); Example
This section is incomplete Reason: no example