2 // (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard
3 // Hinnant & John Maddock 2000. Permission to copy, use, modify,
4 // sell and distribute this software is granted provided this
5 // copyright notice appears in all copies. This software is provided
6 // "as is" without express or implied warranty, and with no claim as
7 // to its suitability for any purpose.
9 // See http://www.boost.org for most recent version including documentation.
11 #ifndef BOOST_TT_REMOVE_VOLATILE_HPP_INCLUDED
12 #define BOOST_TT_REMOVE_VOLATILE_HPP_INCLUDED
14 #include "boost/type_traits/is_const.hpp"
15 #include "boost/type_traits/broken_compiler_spec.hpp"
16 #include "boost/type_traits/detail/cv_traits_impl.hpp"
17 #include "boost/config.hpp"
21 // should be the last #include
22 #include "boost/type_traits/detail/type_trait_def.hpp"
26 #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
30 template <typename T, bool is_const>
31 struct remove_volatile_helper
37 struct remove_volatile_helper<T,true>
43 struct remove_volatile_impl
45 typedef typename remove_volatile_helper<
46 typename cv_traits_imp<T*>::unqualified_type
47 , ::boost::is_const<T>::value
53 // * convert a type T to a non-volatile type - remove_volatile<T>
55 BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_volatile,T,typename detail::remove_volatile_impl<T>::type)
56 BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_volatile,T&,T&)
57 BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_volatile,T volatile[N],T type[N])
58 BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_volatile,T const volatile[N],T const type[N])
62 BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_volatile,T,typename detail::remove_volatile_impl<T>::type)
64 #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
68 #include "boost/type_traits/detail/type_trait_undef.hpp"
70 #endif // BOOST_TT_REMOVE_VOLATILE_HPP_INCLUDED