// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard // Hinnant & John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_IS_MEMBER_FUNCTION_POINTER_HPP_INCLUDED #define BOOST_TT_IS_MEMBER_FUNCTION_POINTER_HPP_INCLUDED #include #include #if !BOOST_WORKAROUND(__BORLANDC__, < 0x600) && !defined(BOOST_TT_TEST_MS_FUNC_SIGS) // // Note: we use the "workaround" version for MSVC because it works for // __stdcall etc function types, where as the partial specialisation // version does not do so. // # include # include # include #else # include # include # include # include #endif namespace boost { #if defined( __CODEGEARC__ ) template struct is_member_function_pointer : public integral_constant {}; #elif !BOOST_WORKAROUND(__BORLANDC__, < 0x600) && !defined(BOOST_TT_TEST_MS_FUNC_SIGS) template struct is_member_function_pointer : public ::boost::integral_constant::type>::value>{}; #else namespace detail { #ifndef __BORLANDC__ template struct is_mem_fun_pointer_select { template struct result_ : public false_type{}; }; template <> struct is_mem_fun_pointer_select { template struct result_ { #if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000) #pragma warning(push) #pragma warning(disable:6334) #endif static T* make_t; typedef result_ self_type; BOOST_STATIC_CONSTANT( bool, value = ( 1 == sizeof(::boost::type_traits::is_mem_fun_pointer_tester(self_type::make_t)) )); #if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000) #pragma warning(pop) #endif }; }; template struct is_member_function_pointer_impl : public is_mem_fun_pointer_select< ::boost::is_reference::value || ::boost::is_array::value>::template result_{}; template struct is_member_function_pointer_impl : public false_type{}; #else // Borland C++ template struct is_member_function_pointer_impl { static T* m_t; BOOST_STATIC_CONSTANT( bool, value = (1 == sizeof(type_traits::is_mem_fun_pointer_tester(m_t))) ); }; template struct is_member_function_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = false); }; #endif template<> struct is_member_function_pointer_impl : public false_type{}; #ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS template<> struct is_member_function_pointer_impl : public false_type{}; template<> struct is_member_function_pointer_impl : public false_type{}; template<> struct is_member_function_pointer_impl : public false_type{}; #endif } // namespace detail template struct is_member_function_pointer : public integral_constant::value>{}; #endif } // namespace boost #endif // BOOST_TT_IS_MEMBER_FUNCTION_POINTER_HPP_INCLUDED