Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 10:01:38

0001 /*
0002 Copyright 2019 Glen Joseph Fernandes
0003 (glenjofe@gmail.com)
0004 
0005 Distributed under the Boost Software License,
0006 Version 1.0. (See accompanying file LICENSE_1_0.txt
0007 or copy at http://www.boost.org/LICENSE_1_0.txt)
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 } /* boost */
0034 
0035 #endif