小编Nay*_*den的帖子

为什么我不能在std :: list中存储boost :: function?

我收到以下编译错误:

error: expected `;' before 'it'"
Run Code Online (Sandbox Code Playgroud)

这是我的代码:

#include <boost/function.hpp>
#include <list>

template< class T >
void example() {
    std::list< boost::function<T ()> >::iterator it;
}
Run Code Online (Sandbox Code Playgroud)

为什么会这样?我该如何解决?

c++ boost list

5
推荐指数
1
解决办法
1376
查看次数

标签 统计

boost ×1

c++ ×1

list ×1