prog.cpp:7:28: error: data member ‘f’ cannot be a member template
prog.cpp: In member function ‘void EG::func(std::function<void(T)>&&)’:
prog.cpp:12:10: error: ‘f’ was not declared in this scope
prog.cpp:17:7: error: ‘f’ was not declared in this scope
prog.cpp: In function ‘int main()’:
prog.cpp:25:28: error: no matching function for call to ‘EG::func(main()::<lambda(std::string)>)’
prog.cpp:25:28: note: candidate is:
prog.cpp:10:9: note: template<class T> void EG::func(std::function<void(T)>&&)
prog.cpp:10:9: note: template argument deduction/substitution failed:
prog.cpp:25:28: note: ‘main()::<lambda(std::string)>’ is not derived from ‘std::function<void(T)>’
prog.cpp:26:20: error: no matching function for call to ‘EG::func(main()::<lambda(int)>)’
prog.cpp:26:20: note: candidate is:
prog.cpp:10:9: note: template<class T> void EG::func(std::function<void(T)>&&)
prog.cpp:10:9: note: template argument deduction/substitution failed:
prog.cpp:26:20: note: ‘main()::<lambda(int)>’ is not derived from ‘std::function<void(T)>’
prog.cpp:28:9: error: expected ‘}’ at end of input