5
我得到以下编译错误:为什么我不能在std :: list中存储boost :: function?
error: expected `;' before 'it'"
这里是我的代码:
#include <boost/function.hpp>
#include <list>
template< class T >
void example() {
std::list< boost::function<T()> >::iterator it;
}
为什么会出现这种情况?我该如何解决它?