为什么这段代码在unix下编译会出问题??急~~~~~~
现有一段代码,在vc6下编译通过,但是在sco unix下用CC -c编译却要报错:
template<typename IterT>
class sub_expr_base<IterT>
{...};
template<typename IterT>
class sub_expr<IterT> : public sub_expr_base<IterT>
{
typedef typename std::iterator_traits<IterT>::value_type char_type;
};
template<typename IterT>
class assertion : public sub_expr<IterT>
{
public:
char_type cc;
};
...
在sco unix下执行CC -c *.cpp编译时会报错:
error: nontype "sub_expr<IterT>::char_type[with IterT=IterT] is not a type name
char_type cc;
请问各位高手这是什么原因啊?是不是sco unix下的名字空间std中没有iterator_traits?