You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What version (or hash if on master) of pybind11 are you using?
2.13.5
Problem description
I cant override pure virtual functions using mixin classes. Pybind does not realize that the function in question does exist but is provided by the mixin class.
Reproducible example code
structM {
intf() { return1; }
};
structA {
virtualintf() = 0;
};
// Imagine a trampoline class AT for A herePYBIND11_MODULE(example, m) {
pybind11::class_<M>(m, "Mixin")
.def("f", &M::f);
pybind11::class_<A, AT>(m, "Abstract")
.def("f", &A::f);
}
classDerived(M, A):
...
d=D()
d.foo()
The last statement throws "Tried to call pure virtual function". For example in plain Python this works as expected:
Required prerequisites
What version (or hash if on master) of pybind11 are you using?
2.13.5
Problem description
I cant override pure virtual functions using mixin classes. Pybind does not realize that the function in question does exist but is provided by the mixin class.
Reproducible example code
The last statement throws "Tried to call pure virtual function". For example in plain Python this works as expected:
Is this a regression? Put the last known working version here if it is.
Not a regression
The text was updated successfully, but these errors were encountered: