0
我想根据某些模板参数类型的常量使用boost :: mpl来控制某些指针类型的常量。这里是我的尝试:使用boost编译错误:: mpl :: if_
template<typename T>
struct iter {
typedef typename boost::mpl::if_<boost::is_same<T, const list>, const sexpr *, sexpr *>::type pointer;
};
编译器但是不接受这一说法:
sexpr.h:154: error: ISO C++ forbids declaration of `type name' with no type
sexpr.h:154: error: template argument 2 is invalid
sexpr.h:154: error: template argument 1 is invalid
sexpr.h:154: error: `type' does not name a type
任何线索我在做什么错?
谢谢!
那么,你的结构后面没有分号,如果有帮助的话。 – chris
我错过了这篇文章,但我确实在代码中有。 –
什么是'list'? –