typedef std::function<void(Input begin> My_Func
解决方案:
template <typename Input>
using My_Func= std::function<void(Input begin>;
参考链接 :
https://stackoverflow.com/questions/19192122/template-declaration-of-typedef-typename-footbar-bar
2,error: field ‘group_‘ has incomplete type
原因:使用了类的前置声明,但又进行了对你实例化,此时系统不知道为该对象分配多大空间;正确使用方式为:在使用前置声明时不要在头文件中直接定义对象,而是定义一个指针,在.cc文件中去new;
参考链接: https://blog.csdn.net/duyiwuer2009/article/details/39401801
原因:1)未引入类型T的头文件,引入相关头文件即可 ;
2)可能该头文件中的#define __*_H_在其他头文件中重复定义,查找重复使用#define 预编译项;
原文:https://www.cnblogs.com/guoliushui/p/12004131.html