Re: [C++-sig] problem returning polymorphic shared_ptr instances

2011-01-12 Thread Matt Bendiksen
You are indeed correct -- I just needed to add a virtual method to the base class. As it turns out this wasn't the problem I was originally having in our application, so my attempt at creating a small sample of the problem wasn't complete. My project's code was failing for what turned out to be

Re: [C++-sig] problem returning polymorphic shared_ptr instances

2011-01-12 Thread Matt Bendiksen
Thanks Jim, but I still cannot get it to work. I now have it defined as: def("get_a_or_b_instance", get_a_or_b_instance); class_ >("A", init<>()) ; class_, bases >("B", init<>()) ; (note I change your example line from "bases" to "bases") I tried it with and without: r

[C++-sig] problem returning polymorphic shared_ptr instances

2011-01-12 Thread Matt Bendiksen
om the second call. I'm using Boost 1.42.0. Thanks in advance for any help. Matt Bendiksen ___ Cplusplus-sig mailing list [email protected] http://mail.python.org/mailman/listinfo/cplusplus-sig