copy_cv_ref.hpp 790 B

12345678910111213141516171819202122232425262728293031
  1. /*
  2. Copyright 2019 Glen Joseph Fernandes
  3. (glenjofe@gmail.com)
  4. Distributed under the Boost Software License,
  5. Version 1.0. (See accompanying file LICENSE_1_0.txt
  6. or copy at http://www.boost.org/LICENSE_1_0.txt)
  7. */
  8. #ifndef BOOST_TT_COPY_CV_REF_HPP_INCLUDED
  9. #define BOOST_TT_COPY_CV_REF_HPP_INCLUDED
  10. #include <boost/type_traits/copy_cv.hpp>
  11. #include <boost/type_traits/copy_reference.hpp>
  12. #include <boost/type_traits/remove_reference.hpp>
  13. namespace boost {
  14. template<class T, class U>
  15. struct copy_cv_ref {
  16. typedef typename copy_reference<typename copy_cv<T,
  17. typename remove_reference<U>::type >::type, U>::type type;
  18. };
  19. #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
  20. template<class T, class U>
  21. using copy_cv_ref_t = typename copy_cv_ref<T, U>::type;
  22. #endif
  23. } /* boost */
  24. #endif