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
is it possible to create operator== for a abstract base class?
with traditional "eq" it works fine fine, however with "py::self == py::self" I get an error:
pybind11/operators.h:163:1: error: invalid abstract return type 'IFoo'
PYBIND11_BINARY_OPERATOR(eq, eq, operator==, l == r)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
is it possible to create operator== for a abstract base class?
with traditional "eq" it works fine fine, however with "py::self == py::self" I get an error:
pybind11/operators.h:163:1: error: invalid abstract return type 'IFoo'
PYBIND11_BINARY_OPERATOR(eq, eq, operator==, l == r)
I have in IFoo a ".def(py::self == py::self)"
Beta Was this translation helpful? Give feedback.
All reactions