I'm wondering if finding the need to add specialisations of
boost::detail::function_traits_helper is a result of missing headers,
incorrect usage or just things that have not been added to
Boost.TypeTraits on purpose?
I'm using Boost 1.34.0 RC and MSVC 8.1 SP1.
The first set can be seen on
http://www.boostcookbook.com/Recipe:/1234841 and the second set on
http://www.boostcookbook.com/Recipe:/1234968
namespace boost {
namespace detail {
template<typename R>
struct function_traits_helper
{
BOOST_STATIC_CONSTANT(int, arity = 0);
typedef R result_type;
};
template
struct function_traits_helper< boost::_bi::bind_t * >
{
BOOST_STATIC_CONSTANT(int, arity = 0);
typedef R result_type;
};
}
}
namespace boost {
namespace detail {
template
struct function_traits_helper< R (C::**)(void) const >
{
BOOST_STATIC_CONSTANT(int, arity = 0);
typedef R result_type;
typedef C class_type;
};
template
struct function_traits_helper< R (C::**)( A1 ) const >
{
BOOST_STATIC_CONSTANT(int, arity = 1);
typedef R result_type;
typedef C class_type;
typedef A1 arg1_type;
};
template
struct function_traits_helper< R (C::**)( A1, A2 ) const >
{
BOOST_STATIC_CONSTANT(int, arity = 2);
typedef R result_type;
typedef C class_type;
typedef A1 arg1_type;
typedef A2 arg2_type;
};
}
}
K