我收到以下编译错误:
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)
为什么会这样?我该如何解决?