mirror of
https://github.com/boostorg/intrusive.git
synced 2025-08-02 14:04:36 +02:00
@@ -195,6 +195,8 @@
|
||||
static const bool value = false;
|
||||
};
|
||||
|
||||
#ifdef BOOST_NO_CXX11_DECLTYPE
|
||||
|
||||
//Special case for 0 args
|
||||
template< class F
|
||||
, std::size_t N =
|
||||
@@ -215,13 +217,20 @@
|
||||
BOOST_PP_CAT(zeroarg_checker_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)(int);
|
||||
};
|
||||
|
||||
#endif //#ifdef BOOST_NO_CXX11_DECLTYPE
|
||||
|
||||
template<typename Fun>
|
||||
struct BOOST_PP_CAT(BOOST_PP_CAT(has_member_function_callable_with_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME),_impl)
|
||||
<Fun, true>
|
||||
{
|
||||
#ifndef BOOST_NO_CXX11_DECLTYPE
|
||||
template<class U, class V = decltype(boost::move_detail::declval<Fun>().BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME()) >
|
||||
static boost_intrusive_has_member_function_callable_with::yes_type Test(Fun*);
|
||||
#else
|
||||
template<class U>
|
||||
static BOOST_PP_CAT(zeroarg_checker_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)
|
||||
static BOOST_PP_CAT(zeroarg_checker_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)
|
||||
<U> Test(BOOST_PP_CAT(zeroarg_checker_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)<U>*);
|
||||
#endif
|
||||
|
||||
template <class U>
|
||||
static boost_intrusive_has_member_function_callable_with::no_type Test(...);
|
||||
|
@@ -68,7 +68,7 @@ class has_member_function_named_func
|
||||
|
||||
}}}
|
||||
|
||||
#if !defined(BOOST_CONTAINER_PERFECT_FORWARDING)
|
||||
#if !defined(BOOST_INTRUSIVE_PERFECT_FORWARDING)
|
||||
|
||||
namespace boost{
|
||||
namespace intrusive{
|
||||
@@ -259,7 +259,7 @@ class has_member_function_named_func
|
||||
|
||||
}}}
|
||||
|
||||
#else
|
||||
#else //#if !defined(BOOST_INTRUSIVE_PERFECT_FORWARDING)
|
||||
|
||||
namespace boost{
|
||||
namespace intrusive{
|
||||
@@ -283,6 +283,7 @@ class has_member_function_named_func
|
||||
namespace intrusive{
|
||||
namespace intrusive_detail{
|
||||
|
||||
#ifdef BOOST_NO_CXX11_DECLTYPE
|
||||
template<class F, std::size_t N = sizeof(boost::move_detail::declval<F>().func(), 0)>
|
||||
struct zeroarg_checker_func
|
||||
{
|
||||
@@ -299,12 +300,19 @@ class has_member_function_named_func
|
||||
zeroarg_checker_func(int);
|
||||
};
|
||||
|
||||
#endif //BOOST_NO_CXX11_DECLTYPE
|
||||
|
||||
template<typename Fun>
|
||||
struct has_member_function_callable_with_func_impl
|
||||
<Fun, true>
|
||||
{
|
||||
template<class U>
|
||||
static zeroarg_checker_func<U> Test(zeroarg_checker_func<U>*);
|
||||
#ifndef BOOST_NO_CXX11_DECLTYPE
|
||||
template<class U, class V = decltype(boost::move_detail::declval<Fun>().func()) >
|
||||
static boost_intrusive_has_member_function_callable_with::yes_type Test(U*);
|
||||
#else
|
||||
template<class U>
|
||||
static zeroarg_checker_func<U> Test(zeroarg_checker_func<U>*);
|
||||
#endif
|
||||
|
||||
template <class U>
|
||||
static has_member_function_callable_with::no_type Test(...);
|
||||
@@ -356,7 +364,7 @@ class has_member_function_named_func
|
||||
|
||||
}}}
|
||||
|
||||
#endif
|
||||
#endif //#if !defined(BOOST_INTRUSIVE_PERFECT_FORWARDING)
|
||||
|
||||
struct functor
|
||||
{
|
||||
|
Reference in New Issue
Block a user