File indexing completed on 2025-01-18 09:53:09
0001 #ifndef BOOST_TYPE_TRAITS_COPY_CV_HPP_INCLUDED
0002 #define BOOST_TYPE_TRAITS_COPY_CV_HPP_INCLUDED
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #include <boost/type_traits/is_const.hpp>
0013 #include <boost/type_traits/is_volatile.hpp>
0014 #include <boost/type_traits/add_const.hpp>
0015 #include <boost/type_traits/add_volatile.hpp>
0016 #include <boost/type_traits/conditional.hpp>
0017
0018 namespace boost
0019 {
0020
0021 template<class T, class U> struct copy_cv
0022 {
0023 private:
0024
0025 typedef typename boost::conditional<boost::is_const<U>::value, typename boost::add_const<T>::type, T>::type CT;
0026
0027 public:
0028
0029 typedef typename boost::conditional<boost::is_volatile<U>::value, typename boost::add_volatile<CT>::type, CT>::type type;
0030 };
0031
0032 #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
0033
0034 template <class T, class U> using copy_cv_t = typename copy_cv<T, U>::type;
0035
0036 #endif
0037
0038 }
0039
0040 #endif