-
Notifications
You must be signed in to change notification settings - Fork 18
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
It's not possible to use std::unique_ptr as arguments. It works as returned value only.
Here is an example unique_ptr.zip
The problem is that even if we write the appropriate MappedType, the generated code that call the method with a std::unique_ptr argument should std::move this one
extern "C" {static PyObject *meth_Test_setObject(PyObject *, PyObject *);}
static PyObject *meth_Test_setObject(PyObject *sipSelf, PyObject *sipArgs)
{
...
{
std::unique_ptr<::AnObject>* a0;
::Test *sipCpp;
if (sipParseArgs(&sipParseErr, sipArgs, "BJ3", &sipSelf, sipType_Test, &sipCpp, sipType_std_unique_ptr_0100AnObject, &a0, SIP_NULLPTR))
{
// sipCpp->setObject(*a0); // generated code, doesn't work, we need to move
sipCpp->setObject(std::move(*a0));
Py_INCREF(Py_None);
return Py_None;
}
}
...
}
Could it be supported by SIP ?
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request