File indexing completed on 2025-01-30 10:01:38
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef BOOST_TT_COPY_REFERENCE_HPP_INCLUDED
0010 #define BOOST_TT_COPY_REFERENCE_HPP_INCLUDED
0011
0012 #include <boost/type_traits/add_lvalue_reference.hpp>
0013 #include <boost/type_traits/add_rvalue_reference.hpp>
0014 #include <boost/type_traits/is_lvalue_reference.hpp>
0015 #include <boost/type_traits/is_rvalue_reference.hpp>
0016 #include <boost/type_traits/conditional.hpp>
0017
0018 namespace boost {
0019
0020 template<class T, class U>
0021 struct copy_reference {
0022 typedef typename conditional<is_rvalue_reference<U>::value,
0023 typename add_rvalue_reference<T>::type,
0024 typename conditional<is_lvalue_reference<U>::value,
0025 typename add_lvalue_reference<T>::type, T>::type>::type type;
0026 };
0027
0028 #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
0029 template<class T, class U>
0030 using copy_reference_t = typename copy_reference<T, U>::type;
0031 #endif
0032
0033 }
0034
0035 #endif