http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46719
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2010-11-30 10:36:42 UTC --- Reduced to get rid of library dependencies: template <typename Return, typename... ArgTypes> struct function { template<typename Functor> function(Functor) { } }; template <typename Return, typename FirstType, typename... ArgTypes> int curry(function<Return(FirstType,ArgTypes...)> func, FirstType) { return 0; } int main() { return curry( [](int x) -> double { return static_cast<double>(x); }, 10 ); }