~ubuntu-branches/ubuntu/warty/aqsis/warty

« back to all changes in this revision

Viewing changes to boost/boost/type_traits/remove_cv.hpp

  • Committer: Bazaar Package Importer
  • Author(s): LaMont Jones
  • Date: 2004-08-24 07:25:04 UTC
  • Revision ID: james.westby@ubuntu.com-20040824072504-zf993vnevvisdsvb
Tags: upstream-0.9.1
ImportĀ upstreamĀ versionĀ 0.9.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
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.
 
8
//
 
9
// See http://www.boost.org for most recent version including documentation.
 
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
 
 
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
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
 
26
 
 
27
//  convert a type T to a non-cv-qualified type - remove_cv<T>
 
28
BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_cv,T,typename detail::cv_traits_imp<T*>::unqualified_type)
 
29
BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_cv,T&,T&)
 
30
BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_cv,T const[N],T type[N])
 
31
BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_cv,T volatile[N],T type[N])
 
32
BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_cv,T const volatile[N],T type[N])
 
33
 
 
34
#else
 
35
 
 
36
namespace detail {
 
37
template <typename T>
 
38
struct remove_cv_impl
 
39
{
 
40
    typedef typename remove_volatile_impl< 
 
41
          typename remove_const_impl<T>::type
 
42
        >::type type;
 
43
};
 
44
}
 
45
 
 
46
BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_cv,T,typename detail::remove_cv_impl<T>::type)
 
47
 
 
48
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
 
49
 
 
50
} // namespace boost
 
51
 
 
52
#include "boost/type_traits/detail/type_trait_undef.hpp"
 
53
 
 
54
#endif // BOOST_TT_REMOVE_CV_HPP_INCLUDED