// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab /* * Copied from: * https://github.com/exclipy/inline_variant_visitor/blob/master/function_signature.hpp * which apparently copied it from * http://stackoverflow.com/questions/4771417/how-to-get-the-signature-of-a-c-bind-expression */ #ifndef FUNCTION_SIGNATURE_H #define FUNCTION_SIGNATURE_H #include #include #include #include #include template struct signature_of_member { typedef typename boost::function_types::result_type::type result_type; typedef typename boost::function_types::parameter_types::type parameter_types; typedef typename boost::mpl::pop_front::type base; typedef typename boost::mpl::push_front::type L; typedef typename boost::function_types::function_type::type type; }; template struct signature_of_impl { typedef typename boost::function_types::function_type::type type; }; template struct signature_of_impl { typedef typename signature_of_member::type type; }; template struct signature_of { typedef typename signature_of_impl::value>::type type; }; #endif