------- Comment #9 from redi at gcc dot gnu dot org 2009-11-22 17:32 ------- I'll try that now. Something like:
template<typename F> struct Bind { F func; template<typename... Arg, typename SfinaeT = decltype( declval<F>() (declval<Arg>()...) )> typename result_of<F(Arg...)>::type call(Arg&&... a) { return func( std::forward<Arg>(a)... ); } template<typename... Arg, typename SfinaeT = decltype( declval<const F>() (declval<Arg>()...) )> typename result_of<const F(Arg...)>::type call(Arg&&... a) const { return func( std::forward<Arg>(a)... ); } }; -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42132