我在 aix6.1 上用 g++4.6.1 编译代码并得到这个错误:-
ViaChecks.h:14:3: error: 'BuPolygonEX<AllPass<CornerT<NetAndVal<ZVal3> > > >::IOPS::Base {aka BuPolygonCore<bu_polygon_clean_func, no_derivatives, AllPass<CornerT<NetAndVal<ZVal3> > > >::IOPS}::IOPS' names the constructor, not the type
结构定义为:
struct ViaSquareCheck : BuPolygonEX<AllPass<CornerT<NetAndVal<ZVal3> > > > {
typedef BuPolygonEX<AllPass<CornerT<NetAndVal<ZVal3> > > > Base;
DEFINE_ENGINE_PROPERTIES_INHERIT(Base::IOPS, void update() { Base::update(); i().xregion_1nm_oversize(x0nm); o().xregion_1nm_oversize(x0nm); o().derivatives(x_dom); o().bu_polygonized(yes); }); // via_square_dim property is added inside
membert(int, amount, -1, ViaSquareCheck);
ViaSquareCheck();
ViaSquareCheck* output(DFC* dfc) { return set_output(0,dfc); } // single output returns good vias
ViaSquareCheck* set_output(int k, DFC* dfc);
void option(const string& pname, const string& pval); // some options change engine properties
private:
BadViaMultiplexer<C>* mux;
GIM2a<APC> bad_via_gim;
GIM2a<APC> good_via_gim;
member(bool, linked, false);
member(bool, ok_45, false);
void link();
member(ViaSquareCheckNetProcess*, np,NULL);
};
DEFINE_ENGINE_PROPERTIES_INHERIT 的定义:-
#define DEFINE_ENGINE_PROPERTIES_INHERIT(SSSS, extras...) \
struct IOPS : SSSS { \
EnginePropertiesVector& i() { return SSSS::i(); }; \
EnginePropertiesVector& o() { return SSSS::o(); }; \
EngineProperties& i(int n) { return SSSS::i(n); }; \
EngineProperties& o(int n) { return SSSS::o(n); }; \
typedef SSSS Base; \
extras; } ep_;
谢谢。
最佳答案
如果您使用名称,则会给出此诊断
myclass::myclass
此名称不表示类 myclass
而是其构造函数
关于c++ - 错误 : names the constructor, 不是类型。使用 g++4.6.1 编译时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8381668/