~ubuntu-branches/ubuntu/wily/davix/wily

« back to all changes in this revision

Viewing changes to deps/boost_intern/boost/type_traits/remove_pointer.hpp

  • Committer: Package Import Robot
  • Author(s): Mattias Ellert
  • Date: 2015-07-31 13:17:55 UTC
  • mfrom: (5.1.3 sid)
  • Revision ID: package-import@ubuntu.com-20150731131755-mizprbmn7ogv33te
Tags: 0.4.1-1
* Update to version 0.4.1
* Implement Multi-Arch support

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 
2
 
//  (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
3
 
//  Use, modification and distribution are subject to the Boost Software License,
4
 
//  Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
5
 
//  http://www.boost.org/LICENSE_1_0.txt).
6
 
//
7
 
//  See http://www.boost.org/libs/type_traits for most recent version including documentation.
8
 
 
9
 
#ifndef BOOST_TT_REMOVE_POINTER_HPP_INCLUDED
10
 
#define BOOST_TT_REMOVE_POINTER_HPP_INCLUDED
11
 
 
12
 
#include <boost/config.hpp>
13
 
#include <boost/detail/workaround.hpp>
14
 
#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
15
 
#include <boost/type_traits/broken_compiler_spec.hpp>
16
 
#endif
17
 
 
18
 
#if BOOST_WORKAROUND(BOOST_MSVC,<=1300)
19
 
#include <boost/type_traits/msvc/remove_pointer.hpp>
20
 
#elif defined(BOOST_MSVC)
21
 
#include <boost/type_traits/remove_cv.hpp>
22
 
#include <boost/type_traits/is_pointer.hpp>
23
 
#endif
24
 
 
25
 
// should be the last #include
26
 
#include <boost/type_traits/detail/type_trait_def.hpp>
27
 
 
28
 
namespace boost {
29
 
 
30
 
#ifdef BOOST_MSVC
31
 
 
32
 
namespace detail{
33
 
 
34
 
   //
35
 
   // We need all this crazy indirection because a type such as:
36
 
   //
37
 
   // T (*const)(U)
38
 
   //
39
 
   // Does not bind to a <T*> or <T*const> partial specialization with VC10 and earlier
40
 
   //
41
 
   template <class T> 
42
 
   struct remove_pointer_imp
43
 
   {
44
 
      typedef T type;
45
 
   };
46
 
 
47
 
   template <class T> 
48
 
   struct remove_pointer_imp<T*>
49
 
   {
50
 
      typedef T type;
51
 
   };
52
 
 
53
 
   template <class T, bool b> 
54
 
   struct remove_pointer_imp3
55
 
   {
56
 
      typedef typename remove_pointer_imp<typename boost::remove_cv<T>::type>::type type;
57
 
   };
58
 
 
59
 
   template <class T> 
60
 
   struct remove_pointer_imp3<T, false>
61
 
   {
62
 
      typedef T type;
63
 
   };
64
 
 
65
 
   template <class T> 
66
 
   struct remove_pointer_imp2
67
 
   {
68
 
      typedef typename remove_pointer_imp3<T, ::boost::is_pointer<T>::value>::type type;
69
 
   };
70
 
}
71
 
 
72
 
BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_pointer,T,typename boost::detail::remove_pointer_imp2<T>::type)
73
 
 
74
 
#elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
75
 
 
76
 
BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_pointer,T,T)
77
 
BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_pointer,T*,T)
78
 
BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_pointer,T* const,T)
79
 
BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_pointer,T* volatile,T)
80
 
BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_pointer,T* const volatile,T)
81
 
 
82
 
#elif !BOOST_WORKAROUND(BOOST_MSVC,<=1300)
83
 
 
84
 
BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_pointer,T,typename boost::detail::remove_pointer_impl<T>::type)
85
 
 
86
 
#endif
87
 
 
88
 
} // namespace boost
89
 
 
90
 
#include <boost/type_traits/detail/type_trait_undef.hpp>
91
 
 
92
 
#endif // BOOST_TT_REMOVE_POINTER_HPP_INCLUDED