我有基类
template<typename T>
Class Base {
Base();
public:
virtual void myfunc()=0;
}
我有派生类
template<typename T>
Class Derived: public Base<T> {
Derived():Base() {
}
public:
void myfunc() override;
}
当我编译时g++ -std=c++0x
,我得到了突出显示覆盖函数的错误,
error: expected ‘;’ at end of member declaration
error: ‘override’ does not name a type
g++ 版本是 4.6。