]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/type_traits/include/boost/type_traits/add_volatile.hpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / type_traits / include / boost / type_traits / add_volatile.hpp
1
2 // (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard
3 // Hinnant & John Maddock 2000.
4 // Use, modification and distribution are subject to the Boost Software License,
5 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
6 // http://www.boost.org/LICENSE_1_0.txt).
7 //
8 // See http://www.boost.org/libs/type_traits for most recent version including documentation.
9
10 #ifndef BOOST_TT_ADD_VOLATILE_HPP_INCLUDED
11 #define BOOST_TT_ADD_VOLATILE_HPP_INCLUDED
12
13 #include <boost/config.hpp>
14
15 namespace boost {
16
17 // * convert a type T to volatile type - add_volatile<T>
18 // this is not required since the result is always
19 // the same as "T volatile", but it does suppress warnings
20 // from some compilers:
21
22 #if defined(BOOST_MSVC)
23 // This bogus warning will appear when add_volatile is applied to a
24 // const volatile reference because we can't detect const volatile
25 // references with MSVC6.
26 # pragma warning(push)
27 # pragma warning(disable:4181) // warning C4181: qualifier applied to reference type ignored
28 #endif
29
30 template <class T> struct add_volatile{ typedef T volatile type; };
31
32 #if defined(BOOST_MSVC)
33 # pragma warning(pop)
34 #endif
35
36 template <class T> struct add_volatile<T&>{ typedef T& type; };
37
38 } // namespace boost
39
40 #endif // BOOST_TT_ADD_VOLATILE_HPP_INCLUDED