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).
8 // See http://www.boost.org/libs/type_traits for most recent version including documentation.
11 #ifndef BOOST_TT_IS_MEMBER_FUNCTION_POINTER_CXX_03_HPP_INCLUDED
12 #define BOOST_TT_IS_MEMBER_FUNCTION_POINTER_CXX_03_HPP_INCLUDED
14 #if !BOOST_WORKAROUND(__BORLANDC__, < 0x600) && !defined(BOOST_TT_TEST_MS_FUNC_SIGS)
16 // Note: we use the "workaround" version for MSVC because it works for
17 // __stdcall etc function types, where as the partial specialisation
18 // version does not do so.
20 # include <boost/type_traits/detail/is_mem_fun_pointer_impl.hpp>
21 # include <boost/type_traits/remove_cv.hpp>
22 # include <boost/type_traits/integral_constant.hpp>
24 # include <boost/type_traits/is_reference.hpp>
25 # include <boost/type_traits/is_array.hpp>
26 # include <boost/type_traits/detail/yes_no_type.hpp>
27 # include <boost/type_traits/detail/is_mem_fun_pointer_tester.hpp>
32 #if defined( __CODEGEARC__ )
33 template <class T> struct is_member_function_pointer : public integral_constant<bool, __is_member_function_pointer( T )> {};
34 #elif !BOOST_WORKAROUND(__BORLANDC__, < 0x600) && !defined(BOOST_TT_TEST_MS_FUNC_SIGS)
36 template <class T> struct is_member_function_pointer
37 : public ::boost::integral_constant<bool, ::boost::type_traits::is_mem_fun_pointer_impl<typename remove_cv<T>::type>::value>{};
46 struct is_mem_fun_pointer_select
48 template <class T> struct result_ : public false_type{};
52 struct is_mem_fun_pointer_select<false>
54 template <typename T> struct result_
56 #if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000)
58 #pragma warning(disable:6334)
61 typedef result_<T> self_type;
63 BOOST_STATIC_CONSTANT(
65 1 == sizeof(::boost::type_traits::is_mem_fun_pointer_tester(self_type::make_t))
67 #if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000)
74 struct is_member_function_pointer_impl
75 : public is_mem_fun_pointer_select<
76 ::boost::is_reference<T>::value || ::boost::is_array<T>::value>::template result_<T>{};
79 struct is_member_function_pointer_impl<T&> : public false_type{};
84 struct is_member_function_pointer_impl
87 BOOST_STATIC_CONSTANT(
89 (1 == sizeof(type_traits::is_mem_fun_pointer_tester(m_t))) );
93 struct is_member_function_pointer_impl<T&>
95 BOOST_STATIC_CONSTANT(bool, value = false);
100 template<> struct is_member_function_pointer_impl<void> : public false_type{};
101 #ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
102 template<> struct is_member_function_pointer_impl<void const> : public false_type{};
103 template<> struct is_member_function_pointer_impl<void const volatile> : public false_type{};
104 template<> struct is_member_function_pointer_impl<void volatile> : public false_type{};
107 } // namespace detail
110 struct is_member_function_pointer
111 : public integral_constant<bool, ::boost::detail::is_member_function_pointer_impl<T>::value>{};
117 #endif // BOOST_TT_IS_MEMBER_FUNCTION_POINTER_HPP_INCLUDED