|
||||
File indexing completed on 2025-01-30 10:01:38
0001 0002 // (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard 0003 // Hinnant & John Maddock 2000. 0004 // Use, modification and distribution are subject to the Boost Software License, 0005 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 0006 // http://www.boost.org/LICENSE_1_0.txt). 0007 // 0008 // See http://www.boost.org/libs/type_traits for most recent version including documentation. 0009 0010 0011 #ifndef BOOST_TT_ADD_CV_HPP_INCLUDED 0012 #define BOOST_TT_ADD_CV_HPP_INCLUDED 0013 0014 #include <boost/config.hpp> 0015 0016 namespace boost { 0017 0018 // * convert a type T to a const volatile type - add_cv<T> 0019 // this is not required since the result is always 0020 // the same as "T const volatile", but it does suppress warnings 0021 // from some compilers: 0022 0023 #if defined(BOOST_MSVC) 0024 // This bogus warning will appear when add_volatile is applied to a 0025 // const volatile reference because we can't detect const volatile 0026 // references with MSVC6. 0027 # pragma warning(push) 0028 # pragma warning(disable:4181) // warning C4181: qualifier applied to reference type ignored 0029 #endif 0030 0031 template <class T> struct add_cv{ typedef T const volatile type; }; 0032 0033 #if defined(BOOST_MSVC) 0034 # pragma warning(pop) 0035 #endif 0036 0037 template <class T> struct add_cv<T&>{ typedef T& type; }; 0038 0039 #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) 0040 0041 template <class T> using add_cv_t = typename add_cv<T>::type; 0042 0043 #endif 0044 0045 } // namespace boost 0046 0047 #endif // BOOST_TT_ADD_CV_HPP_INCLUDED
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |