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).
8 // See http://www.boost.org/libs/type_traits for most recent version including documentation.
11 #ifndef BOOST_TT_ADD_CV_HPP_INCLUDED
12 #define BOOST_TT_ADD_CV_HPP_INCLUDED
14 #include <boost/config.hpp>
18 // * convert a type T to a const volatile type - add_cv<T>
19 // this is not required since the result is always
20 // the same as "T const volatile", but it does suppress warnings
21 // from some compilers:
23 #if defined(BOOST_MSVC)
24 // This bogus warning will appear when add_volatile is applied to a
25 // const volatile reference because we can't detect const volatile
26 // references with MSVC6.
27 # pragma warning(push)
28 # pragma warning(disable:4181) // warning C4181: qualifier applied to reference type ignored
31 template <class T> struct add_cv{ typedef T const volatile type; };
33 #if defined(BOOST_MSVC)
37 template <class T> struct add_cv<T&>{ typedef T& type; };
41 #endif // BOOST_TT_ADD_CV_HPP_INCLUDED