https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63515
--- Comment #2 from Luka Rahne <luka.rahne at gmail dot com> --- This bug boils to to point where in member function template <typename... Rem> CurriedImpl<Depth-sizeof...(Rem),F> //sizeof...(Rem) depends here on size of arguments of std::function operator()(Rem ... a_rem) { } deduced number of arguments depends on number of arguments in F