Opened 9 years ago

Last modified 5 years ago

#3054 new Bugs

boost::python doesn't support implicit intrusive_ptr casts

Reported by: macke@… Owned by: troy d. straszheim
Milestone: Boost 1.40.0 Component: python USE GITHUB
Version: Boost 1.37.0 Severity: Problem
Keywords: Cc:


See 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:

template<class T, class B, class X, class Y>
class myclass : boost::python::class_<T, B, X, Y>
   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() );

Attachments (0)

Change History (3)

comment:1 Changed 8 years ago by troy d. straszheim

Owner: changed from Dave Abrahams to troy d. straszheim

comment:2 Changed 5 years ago by kernys01@…

any progress here?

comment:3 Changed 5 years ago by anonymous

We haven't upgraded our Boost version since I wrote that, so I can't comment on that

This ticket hasn't gotten any love, that's for sure... :(

Modify Ticket

Change Properties
Set your email in Preferences
as new The owner will remain troy d. straszheim.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.