Reputation: 1099
I am compiling the code with g++4.6.1 on aix6.1 and getting this error:-
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
The structure is defined as :
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);
};
Definition of 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_;
Thanks.
Upvotes: 2
Views: 8732
Reputation: 1099
It is a qualified name like Base::IOPS,
we need to have a typename
before that. You need to pass a type instead of qualified name Base::IOPS
, so i defined a type
typedef Base::IOPS MYIOP
and then passed that type, so the error "this is not a type" is gone.
Upvotes: 1
Reputation: 98446
I'd say that when you say:
DEFINE_ENGINE_PROPERTIES_INHERIT(Base::IOPS, ...
You should write:
DEFINE_ENGINE_PROPERTIES_INHERIT(Base, ...
That is, without the ::IOPS
.
Upvotes: 0
Reputation: 507115
This diagnostic is given if you use the name
myclass::myclass
This name does not denote the class myclass
but its constructor(s)
Upvotes: 1
Reputation: 1
You should preprocess your source code with something like
g++ -C -E yoursource.cc | grep -v '^#' > yoursource.ii
(the grep -v
removes the line numbering)
then compile the preprocessed form with
g++ -Wall -c yoursource.ii
then look at the locations of the error message in yoursource.ii
You might also ask on [email protected]
.
But as others pointed out, your code is not very pretty...
Upvotes: 0