Support for std::unique_ptr parameters

Bug #1372020 reported by Kevin Stenerson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
PyBindGen
New
Undecided
Unassigned

Bug Description

I'd like support for std::unique_ptr<T> parameters (and probably eventually retvals, but will get to that later).

A unique pointer can act like a normal CppClassPtrParameter, except for the following:

 - It shouldn't be used with RefCountedMemoryPolicy
 - It should behave like transfer_ownership is always true
 - It should have a pointer_name like 'std::unique_ptr< T_full_name >`
 - It needs to be passed as an argument with `move(value_ptr)` instead of just `value_ptr`

Hopefully those are all of the important cases.

I've attached a patch that I believe implements it correctly.

Unfourtenately, no unittests or examples this time >_<.

Revision history for this message
Kevin Stenerson (stenersonkevin) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.