[C++-sig] pyste: excluding a constructor

Dan Halbert halbert at bbn.com
Thu Mar 4 00:45:49 CET 2004


OK, now a pyste question, with the 1.31.0 pyste:

I have code like this:

========================================
class Opaque; // Forward declaration, not otherwise declared in this .h

class Foo {
public:
	Foo(int);
	Foo(Opaque*);
        // ...
}
========================================

I get "use of undefined type" and "forward declaration" g++ errors about
Opaque. I see two possibilities:

1. Can I use a policy, maybe, to avoid this error?

2. I don't necessarily care about pythonizing the second constructor.
I could exclude Opaque, but how do I exclude the second constructor?

Nicodemus mentioned some meta-programming constructs he was adding
sometime last summer which looked like they could be used to iterate
through the constructors and exclude the second one. But I tried
something like his example and couldn't get it to work. I studied
infos.py but didn't glean a solution.

Thanks very much,
Dan

	




More information about the Cplusplus-sig mailing list