1 | |
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). |
7 | // |
8 | // See http://www.boost.org/libs/type_traits for most recent version including documentation. |
9 | |
10 | |
11 | #ifndef BOOST_TT_REMOVE_CV_HPP_INCLUDED |
12 | #define BOOST_TT_REMOVE_CV_HPP_INCLUDED |
13 | |
14 | #include <boost/type_traits/detail/cv_traits_impl.hpp> |
15 | #include <boost/config.hpp> |
16 | #include <boost/detail/workaround.hpp> |
17 | |
18 | #include <cstddef> |
19 | |
20 | // should be the last #include |
21 | #include <boost/type_traits/detail/type_trait_def.hpp> |
22 | |
23 | namespace boost { |
24 | |
25 | |
26 | namespace detail{ |
27 | |
28 | template <class T> |
29 | struct rvalue_ref_filter_rem_cv |
30 | { |
31 | typedef typename boost::detail::cv_traits_imp<BOOST_TT_AUX_CV_TRAITS_IMPL_PARAM(T)>::unqualified_type type; |
32 | }; |
33 | |
34 | #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES |
35 | // |
36 | // We can't filter out rvalue_references at the same level as |
37 | // references or we get ambiguities from msvc: |
38 | // |
39 | template <class T> |
40 | struct rvalue_ref_filter_rem_cv<T&&> |
41 | { |
42 | typedef T&& type; |
43 | }; |
44 | #endif |
45 | |
46 | } |
47 | |
48 | |
49 | // convert a type T to a non-cv-qualified type - remove_cv<T> |
50 | BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_cv,T,typename boost::detail::rvalue_ref_filter_rem_cv<T>::type) |
51 | BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_cv,T&,T&) |
52 | #if !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS) |
53 | BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_cv,T const[N],T type[N]) |
54 | BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_cv,T volatile[N],T type[N]) |
55 | BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_cv,T const volatile[N],T type[N]) |
56 | #endif |
57 | |
58 | |
59 | } // namespace boost |
60 | |
61 | #include <boost/type_traits/detail/type_trait_undef.hpp> |
62 | |
63 | #endif // BOOST_TT_REMOVE_CV_HPP_INCLUDED |
64 | |