]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/type_traits/include/boost/type_traits/copy_cv.hpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / type_traits / include / boost / type_traits / copy_cv.hpp
1 #ifndef BOOST_TYPE_TRAITS_COPY_CV_HPP_INCLUDED
2 #define BOOST_TYPE_TRAITS_COPY_CV_HPP_INCLUDED
3
4 //
5 // Copyright 2015 Peter Dimov
6 //
7 // Distributed under the Boost Software License, Version 1.0.
8 // See accompanying file LICENSE_1_0.txt or copy at
9 // http://www.boost.org/LICENSE_1_0.txt
10 //
11
12 #include <boost/type_traits/is_const.hpp>
13 #include <boost/type_traits/is_volatile.hpp>
14 #include <boost/type_traits/add_const.hpp>
15 #include <boost/type_traits/add_volatile.hpp>
16 #include <boost/type_traits/conditional.hpp>
17
18 namespace boost
19 {
20
21 template<class T, class U> struct copy_cv
22 {
23 private:
24
25 typedef typename boost::conditional<boost::is_const<U>::value, typename boost::add_const<T>::type, T>::type CT;
26
27 public:
28
29 typedef typename boost::conditional<boost::is_volatile<U>::value, typename boost::add_volatile<CT>::type, CT>::type type;
30 };
31
32 } // namespace boost
33
34 #endif // #ifndef BOOST_TYPE_TRAITS_COPY_CV_HPP_INCLUDED