[Boost-bugs] [Boost C++ Libraries] #3054: boost::python doesn't support implicit intrusive_ptr casts

Subject: [Boost-bugs] [Boost C++ Libraries] #3054: boost::python doesn't support implicit intrusive_ptr casts
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-05-20 12:52:45


#3054: boost::python doesn't support implicit intrusive_ptr casts
--------------------------+-------------------------------------------------
 Reporter: macke_at_[hidden] | Owner: dave
     Type: Bugs | Status: new
Milestone: Boost 1.40.0 | Component: Python
  Version: Boost 1.37.0 | Severity: Problem
 Keywords: |
--------------------------+-------------------------------------------------
 See http://mail.python.org/pipermail/cplusplus-
 sig/2007-February/011651.html for code that solves this. (the boostPatch
 namespace contents)

 I couldn't find anything on Boost.Python in the release notes for 1.38 or
 1.39, so I assume it's still in there.

 Also, for those who need this before it's included in
 boost::python::class_, a better use of the functions (than the typedeffing
 in the post above) is:

 {{{
 #!cpp
 template<class T, class B, class X, class Y>
 class myclass : boost::python::class_<T, B, X, Y>
 {
 public:
    template<class Constructor>
    myclass(const char* name, const Constructor& t) :
 boost::python::class_<T, B, X, Y>(name, t)
    {
       boostPatch::register_intrusive_ptr_from_python_and_casts( (T *)0,
 metadata::bases() );
    }
 };
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/3054>
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