Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2024-11-15 09:33:11

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_REMOVE_CV_HPP_INCLUDED
0012 #define BOOST_TT_REMOVE_CV_HPP_INCLUDED
0013 
0014 #include <boost/config.hpp>
0015 #include <boost/detail/workaround.hpp>
0016 #include <cstddef> // size_t
0017 
0018 namespace boost {
0019 
0020    //  convert a type T to a non-cv-qualified type - remove_cv<T>
0021 template <class T> struct remove_cv{ typedef T type; };
0022 template <class T> struct remove_cv<T const>{ typedef T type;  };
0023 template <class T> struct remove_cv<T volatile>{ typedef T type; };
0024 template <class T> struct remove_cv<T const volatile>{ typedef T type; };
0025 
0026 #if !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS)
0027 template <class T, std::size_t N> struct remove_cv<T const[N]>{ typedef T type[N]; };
0028 template <class T, std::size_t N> struct remove_cv<T const volatile[N]>{ typedef T type[N]; };
0029 template <class T, std::size_t N> struct remove_cv<T volatile[N]>{ typedef T type[N]; };
0030 #if !BOOST_WORKAROUND(BOOST_BORLANDC, < 0x600) && !defined(__IBMCPP__) &&  !BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840))
0031 template <class T> struct remove_cv<T const[]>{ typedef T type[]; };
0032 template <class T> struct remove_cv<T const volatile[]>{ typedef T type[]; };
0033 template <class T> struct remove_cv<T volatile[]>{ typedef T type[]; };
0034 #endif
0035 #endif
0036 
0037 #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
0038 
0039    template <class T> using remove_cv_t = typename remove_cv<T>::type;
0040 
0041 #endif
0042 
0043 } // namespace boost
0044 
0045 #endif // BOOST_TT_REMOVE_CV_HPP_INCLUDED