Unverified Commit fd8265e2 authored by Dustin Spicuzza's avatar Dustin Spicuzza Committed by GitHub
Browse files

Fix smart_holder multiple inheritance tests (#3635)

The original pybind11 holder supported multiple inheritance by recursively creating
type casters until it finds one for the source type, then converting each
value in turn to the next type via typeinfo->implicit_cast

The smart_holder only stored the last implicit_cast, which was incorrect.

This commit changes it to create a list of implicit_cast functions that are
appended to during the recursive type caster creation, and when the time comes
to cast to the destination type, it calls all of them in the correct order.
parent b2f0b091
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment