[C++-sig] [Py++] Nested enum as default arg

Kirill Lapshin kir at lapshin.net
Tue Sep 5 17:40:31 CEST 2006


Hi,

Suppose I have

struct Foo
{
     enum Bar {BAR1, BAR2};

     explicit Foo(Bar arg = BAR1);
};


Py++ generates code that tries to add constructor (and default argument) 
prior to enum being registered. Result is exception in module import.

Any ideas how to fix / work around? Other then moving enum outside the 
class?

Cheers,
Kirill




More information about the Cplusplus-sig mailing list