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).
7
// See http://www.boost.org/libs/type_traits for most recent version including documentation.
9
#ifndef BOOST_TT_REMOVE_POINTER_HPP_INCLUDED
10
#define BOOST_TT_REMOVE_POINTER_HPP_INCLUDED
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>
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>
25
// should be the last #include
26
#include <boost/type_traits/detail/type_trait_def.hpp>
35
// We need all this crazy indirection because a type such as:
39
// Does not bind to a <T*> or <T*const> partial specialization with VC10 and earlier
42
struct remove_pointer_imp
48
struct remove_pointer_imp<T*>
53
template <class T, bool b>
54
struct remove_pointer_imp3
56
typedef typename remove_pointer_imp<typename boost::remove_cv<T>::type>::type type;
60
struct remove_pointer_imp3<T, false>
66
struct remove_pointer_imp2
68
typedef typename remove_pointer_imp3<T, ::boost::is_pointer<T>::value>::type type;
72
BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_pointer,T,typename boost::detail::remove_pointer_imp2<T>::type)
74
#elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
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)
82
#elif !BOOST_WORKAROUND(BOOST_MSVC,<=1300)
84
BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_pointer,T,typename boost::detail::remove_pointer_impl<T>::type)
90
#include <boost/type_traits/detail/type_trait_undef.hpp>
92
#endif // BOOST_TT_REMOVE_POINTER_HPP_INCLUDED