1
2// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes,
3// Howard Hinnant and John Maddock 2000.
4// (C) Copyright Mat Marcus, Jesse Jones and Adobe Systems Inc 2001
5
6// Use, modification and distribution are subject to the Boost Software License,
7// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
8// http://www.boost.org/LICENSE_1_0.txt).
9//
10// See http://www.boost.org/libs/type_traits for most recent version including documentation.
11
12// Fixed is_pointer, is_reference, is_const, is_volatile, is_same,
13// is_member_pointer based on the Simulated Partial Specialization work
14// of Mat Marcus and Jesse Jones. See http://opensource.adobe.com or
15// http://groups.yahoo.com/group/boost/message/5441
16// Some workarounds in here use ideas suggested from "Generic<Programming>:
17// Mappings between Types and Values"
18// by Andrei Alexandrescu (see http://www.cuj.com/experts/1810/alexandr.html).
19
20
21#ifndef BOOST_TT_IS_MEMBER_POINTER_HPP_INCLUDED
22#define BOOST_TT_IS_MEMBER_POINTER_HPP_INCLUDED
23
24#include <boost/type_traits/config.hpp>
25#include <boost/detail/workaround.hpp>
26
27#if !BOOST_WORKAROUND(__BORLANDC__, < 0x600)
28# include <boost/type_traits/is_member_function_pointer.hpp>
29#else
30# include <boost/type_traits/is_reference.hpp>
31# include <boost/type_traits/is_array.hpp>
32# include <boost/type_traits/detail/is_mem_fun_pointer_tester.hpp>
33# include <boost/type_traits/detail/yes_no_type.hpp>
34# include <boost/type_traits/detail/false_result.hpp>
35# include <boost/type_traits/detail/ice_or.hpp>
36#endif
37
38// should be the last #include
39#include <boost/type_traits/detail/bool_trait_def.hpp>
40
41namespace boost {
42
43#if defined( __CODEGEARC__ )
44BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_member_pointer,T,__is_member_pointer(T))
45#elif BOOST_WORKAROUND(__BORLANDC__, < 0x600)
46BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_member_pointer,T,false)
47BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,typename U,is_member_pointer,U T::*,true)
48
49#else
50BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_member_pointer,T,::boost::is_member_function_pointer<T>::value)
51BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,typename U,is_member_pointer,U T::*,true)
52
53#if !BOOST_WORKAROUND(__MWERKS__,<=0x3003) && !BOOST_WORKAROUND(__IBMCPP__, <=600)
54BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,typename U,is_member_pointer,U T::*const,true)
55BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,typename U,is_member_pointer,U T::*volatile,true)
56BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,typename U,is_member_pointer,U T::*const volatile,true)
57#endif
58
59#endif
60
61} // namespace boost
62
63#include <boost/type_traits/detail/bool_trait_undef.hpp>
64
65#endif // BOOST_TT_IS_MEMBER_POINTER_HPP_INCLUDED
66