Skip to content

multiple inheritance with nanobind on the python side #184

Answered by wjakob
kaschau asked this question in Q&A
Discussion options

You must be logged in to vote

This is correct. It will currently fail with the exception

RuntimeError: nb_type_init(): invalid number of bases!

It is possible that multiple inheritance on the Python side could be handled when the underlying class hierarchy doesn't mix in more than one C++-based class. I have not though too much about this special case since none of my own projects need it. I am open to PRs in this regard if's just a matter of relaxing that condition without adding further complexity/performance cost to the project.

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by wjakob
Comment options

You must be logged in to vote
6 replies
@WillAyd
Comment options

@wjakob
Comment options

@WillAyd
Comment options

@wjakob
Comment options

@WillAyd
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants