Closed
Description
Issue description
I'm binding a complex c++ library to python, in this lib, it has many inheritance, and for example
class A {
public:
enum AEnum{...}
}
class B: public A {
public:
enum AEnum{...}
}
in child class, there is a enum with exact same name with parent class, but it has different values. so in my binding code, I can bind these enum to each class, it compiles fine, but when in python, if I use import testmodule
, then it throws an error about that AEnum
is already defined.
So How could I export these different enums with same name, but in different class?
PS: I didn't use py::enum_<xx>().export_values()
, I don't want any of these enum values in my root module.