[Boost-bugs] [Boost C++ Libraries] #3210: dynamic_cast fails between modules

Subject: [Boost-bugs] [Boost C++ Libraries] #3210: dynamic_cast fails between modules
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-06-23 15:57:35


#3210: dynamic_cast fails between modules
-------------------------------+--------------------------------------------
 Reporter: renatox@… | Owner: dave
     Type: Bugs | Status: new
Milestone: Boost 1.40.0 | Component: Python
  Version: Boost 1.39.0 | Severity: Problem
 Keywords: |
-------------------------------+--------------------------------------------
 in file: python/detail/wrapper_base.hpp:64

 function:

 namespace wrapper_base_ // ADL disabler
   {
     template <class T>
     inline PyObject*
     owner_impl(T const volatile* x, mpl::true_)
     {
         if (wrapper_base const volatile* w = dynamic_cast<wrapper_base
 const volatile*>(x)) /*this dynamic cast fails */
         {
             printf("dynamic_cast: OK\n");
             return wrapper_base_::get_owner(*w);
         }
         printf("dynamic_cast: FAIL %s:%p\n",
 boost::python::type_id<wrapper_base>().name(), x);
         return 0;
     }


 this dynamic cast fail:
 " dynamic_cast<wrapper_base const volatile*>(x) " when type of x not is
 not in the current module, this cause boost create a new PyObject for the
 c++ pointer.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/3210>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:00 UTC