
AMDG e r wrote:
I may have made a little bit of progress here...
template<typename A> struct result<fun(const A&)>{ typedef A type; };
Yeah. That's the idea. I generally use function_traits rather than partial specialization. In your original example (untested): #include <boost/type_traits/function_traits.hpp> #include <boost/type_traits/remove_cv.hpp> #include <boost/type_traits/remove_refence.hpp> struct fun { template<class Sig> struct result { typedef typename boost::function_traits<Sig>::arg1_type arg1_type; typedef typename boost::function_traits<Sig>::arg2_type arg2_type; typedef typename boost::remove_cv<typename boost::remove_reference<arg1_type>::type>::type Metafun; typedef typename Metafun::type type; }; // ... } In Christ, Steven Watanabe