source: vendor/nemo/current/NEMOGCM/EXTERNAL/XIOS/extern/boost/include/boost/type_traits/remove_cv.hpp @ 44

Last change on this file since 44 was 44, checked in by cholod, 12 years ago

Load NEMO_TMP into vendor/nemo/current.

File size: 2.3 KB
Line 
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/broken_compiler_spec.hpp>
15#include <boost/type_traits/detail/cv_traits_impl.hpp>
16#include <boost/config.hpp>
17#include <boost/detail/workaround.hpp>
18
19#include <cstddef>
20
21#if BOOST_WORKAROUND(BOOST_MSVC,<=1300)
22#include <boost/type_traits/msvc/remove_cv.hpp>
23#endif
24
25// should be the last #include
26#include <boost/type_traits/detail/type_trait_def.hpp>
27
28namespace boost {
29
30namespace detail{
31
32template <class T>
33struct rvalue_ref_filter_rem_cv
34{
35        typedef typename boost::detail::cv_traits_imp<T*>::unqualified_type type;
36};
37
38#ifndef BOOST_NO_RVALUE_REFERENCES
39//
40// We can't filter out rvalue_references at the same level as
41// references or we get ambiguities from msvc:
42//
43template <class T>
44struct rvalue_ref_filter_rem_cv<T&&>
45{
46        typedef T&& type;
47};
48#endif
49
50}
51
52#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
53
54//  convert a type T to a non-cv-qualified type - remove_cv<T>
55BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_cv,T,typename boost::detail::rvalue_ref_filter_rem_cv<T>::type)
56BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_cv,T&,T&)
57#if !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS)
58BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_cv,T const[N],T type[N])
59BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_cv,T volatile[N],T type[N])
60BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_cv,T const volatile[N],T type[N])
61#endif
62
63#elif !BOOST_WORKAROUND(BOOST_MSVC,<=1300)
64
65namespace detail {
66template <typename T>
67struct remove_cv_impl
68{
69    typedef typename remove_volatile_impl< 
70          typename remove_const_impl<T>::type
71        >::type type;
72};
73}
74
75BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_cv,T,typename boost::detail::remove_cv_impl<T>::type)
76
77#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
78
79} // namespace boost
80
81#include <boost/type_traits/detail/type_trait_undef.hpp>
82
83#endif // BOOST_TT_REMOVE_CV_HPP_INCLUDED
Note: See TracBrowser for help on using the repository browser.