// (C) Copyright Tobias Schwinger // // Use modification and distribution are subject to the boost Software License, // Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). //------------------------------------------------------------------------------ #ifndef BOOST_FT_DETAIL_CLASSIFIER_HPP_INCLUDED #define BOOST_FT_DETAIL_CLASSIFIER_HPP_INCLUDED #include #include #include #include #include #include #include namespace boost { namespace function_types { namespace detail { template struct classifier; template struct char_array { typedef char (&type)[S]; }; template struct encode_charr { typedef typename char_array< ::boost::function_types::detail::encode_charr_impl::value >::type type; }; char BOOST_TT_DECL classifier_impl(...); #define BOOST_FT_variations BOOST_FT_function|BOOST_FT_pointer|\ BOOST_FT_member_pointer #define BOOST_FT_type_function(cc,name) BOOST_FT_SYNTAX( \ R BOOST_PP_EMPTY,BOOST_PP_LPAREN,cc,* BOOST_PP_EMPTY,name,BOOST_PP_RPAREN) #define BOOST_FT_type_function_pointer(cc,name) BOOST_FT_SYNTAX( \ R BOOST_PP_EMPTY,BOOST_PP_LPAREN,cc,** BOOST_PP_EMPTY,name,BOOST_PP_RPAREN) #define BOOST_FT_type_member_function_pointer(cc,name) BOOST_FT_SYNTAX( \ R BOOST_PP_EMPTY,BOOST_PP_LPAREN,cc,T0::** BOOST_PP_EMPTY,name,BOOST_PP_RPAREN) #define BOOST_FT_al_path boost/function_types/detail/classifier_impl #include template struct classifier_bits { static typename boost::add_reference::type tester; BOOST_STATIC_CONSTANT(bits_t,value = (bits_t)sizeof( boost::function_types::detail::classifier_impl(& tester) )-1); }; template struct classifier { typedef detail::constant< ::boost::function_types::detail::decode_bits< ::boost::function_types::detail::classifier_bits::value >::tag_bits > bits; typedef detail::full_mask mask; typedef detail::constant< ::boost::function_types::detail::decode_bits< ::boost::function_types::detail::classifier_bits::value >::arity > function_arity; }; } } } // namespace ::boost::function_types::detail #endif