type_identity.hpp 636 B

12345678910111213141516171819202122232425262728293031
  1. #ifndef BOOST_TYPE_TRAITS_TYPE_IDENTITY_HPP_INCLUDED
  2. #define BOOST_TYPE_TRAITS_TYPE_IDENTITY_HPP_INCLUDED
  3. //
  4. // Copyright 2015 Peter Dimov
  5. //
  6. // Distributed under the Boost Software License, Version 1.0.
  7. // See accompanying file LICENSE_1_0.txt or copy at
  8. // http://www.boost.org/LICENSE_1_0.txt
  9. //
  10. #include <boost/config.hpp>
  11. namespace boost
  12. {
  13. template<class T> struct type_identity
  14. {
  15. typedef T type;
  16. };
  17. #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
  18. template <class T> using type_identity_t = typename type_identity<T>::type;
  19. #endif
  20. } // namespace boost
  21. #endif // #ifndef BOOST_TYPE_TRAITS_TYPE_IDENTITY_HPP_INCLUDED