| Home | Libraries | People | FAQ | More

### type_identity

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

    template <class T> using type_identity_t = typename type_identity<T>::type; // C++11 and above

Header: `#include <boost/type_traits/type_identity.hpp>` or `#include <boost/type_traits.hpp>`

Table 1.37. Examples

Expression | Result Type
--- | ---
`type_identity<int>::type` | `int`
`type_identity<int&>::type` | `int&`
`type_identity<int* const&>::type` | `int* const&`