Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:53:09

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 #ifndef BOOST_TT_ADD_VOLATILE_HPP_INCLUDED
0011 #define BOOST_TT_ADD_VOLATILE_HPP_INCLUDED
0012 
0013 #include <boost/config.hpp>
0014 
0015 namespace boost {
0016 
0017 // * convert a type T to volatile type - add_volatile<T>
0018 // this is not required since the result is always
0019 // the same as "T volatile", but it does suppress warnings
0020 // from some compilers:
0021 
0022 #if defined(BOOST_MSVC)
0023 // This bogus warning will appear when add_volatile is applied to a
0024 // const volatile reference because we can't detect const volatile
0025 // references with MSVC6.
0026 #   pragma warning(push)
0027 #   pragma warning(disable:4181) // warning C4181: qualifier applied to reference type ignored
0028 #endif 
0029 
0030 template <class T> struct add_volatile{ typedef T volatile type; };
0031 
0032 #if defined(BOOST_MSVC)
0033 #   pragma warning(pop)
0034 #endif 
0035 
0036 template <class T> struct add_volatile<T&>{ typedef T& type; };
0037 
0038 #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
0039 
0040    template <class T> using add_volatile_t = typename add_volatile<T>::type;
0041 
0042 #endif
0043 
0044 } // namespace boost
0045 
0046 #endif // BOOST_TT_ADD_VOLATILE_HPP_INCLUDED