From: SourceForge.net <no...@so...> - 2011-06-26 07:11:58
|
Bugs item #3333549, was opened at 2011-06-26 07:05 Message generated for change (Comment added) made by You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=101645&aid=3333549&group_id=1645 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: python Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: https://www.google.com/accounts () Assigned to: Nobody/Anonymous (nobody) Summary: upcast bug with shared_ptr Initial Comment: Polymorphism for shared_ptr declared templated classes which use typedef does not work. If a templated shared_ptr class hiearchy is declared which uses a typedef for the templated class, SWIG does not correctly resolve the correct class hierchy. This is illustrated by the minimal example attached, which fails when run. I am not sure it is related but in the generated wrapper code are shared_ptr types generated correctly for the typedefed template class Base<INT> and Derived<INT> #define SWIGTYPE_p_boost__shared_ptrT_BaseT_INT_t_t swig_types[2] #define SWIGTYPE_p_boost__shared_ptrT_DerivedT_INT_t_t swig_types[3] But only the corresponding none shared_ptr type is defined with the typedef resolved: #define SWIGTYPE_p_boost__shared_ptrT_BaseT_INT_t_t swig_types[2] #define SWIGTYPE_p_boost__shared_ptrT_DerivedT_INT_t_t swig_types[3] Johan ---------------------------------------------------------------------- >Comment By: https://www.google.com/accounts () Date: 2011-06-26 07:11 Message: The handed test has been checked failing for SWIG version 2.0.4 on a Linux box The bug can be reproduced by downloading the files and type make Johan ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=101645&aid=3333549&group_id=1645 |