type_identity
The type_identity
and related type_identity_t
are useful in controlling function template declarations where the arguments need to have their types prevent from being mutated or changed in undesirable ways. Otherwise, it does exactly what it says on the tin: launders the given type parameter into the ::type
aspect.
-
template<typename _Type>
class type_identity A type for giving the exact same type out as was put in.
-
using ztd::type_identity_t = typename type_identity<_Type>::type
A
_t
typename alias for ztd::type_identity.