Helping ChaiScript to downcast


How would i go about telling ChaiScript that may shared_ptr to Base is to be downcast to Derived_A when the non-polymorphic Derived_A::a member is accessed in script via shared_ptr to Base?

i set up base_class between user_types and a type_conversion between shared_ptr and shared_ptr<Derived_A> using static_pointer_cast. But using base.a = 123; in script still tells me that Base has no such member.
Do i have to explicitly convert Base to Derived_A in script for this to work?


As it goes, this kind of solved itself - just writing about it seems to have magically mended my script.
For those having similar troubles - no, explicit conversion should not be needed as long as there is unambiguous route of conversion/casting between your types.