blob: 5fe7e92d2f5be2b80ba274f463f0d3844f95f370 [file] [log] [blame]
[/
Copyright 2015 Peter Dimov.
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
]
[section:type_identity 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 Examples
[ [Expression] [Result Type]]
[[`type_identity<int>::type`][`int`]]
[[`type_identity<int&>::type`] [`int&`]]
[[`type_identity<int* const&>::type`] [`int* const&`]]
]
[endsect]