I'm running in some trouble with extract during unpickling of null smart-pointer. I have registered a intrusive_ptr based smart-pointer which works greatly. During pickling, my null smart-pointer converted into None. During unpickling, when I use extract<MyPtrType> on a null smart-pointer I get a conversion error saying that there is no conversion from NoneType to MyPtrType. Is this a known issue, or did I miss something ? As a work-around I tried to test if tuple[1] was None, but couldn't figure out how to do that in C++. Any tips ? Baptiste.
"Baptiste Lepilleur" <gaiacrtn@free.fr> writes:
I'm running in some trouble with extract during unpickling of null smart-pointer. I have registered a intrusive_ptr based
^^^^^^^^^^ Registered how? Please show code.
smart-pointer which works greatly.
During pickling, my null smart-pointer converted into None. During unpickling, when I use extract<MyPtrType> on a null smart-pointer I get a conversion error saying that there is no conversion from NoneType to MyPtrType.
Is this a known issue, or did I miss something ?
As a work-around I tried to test if tuple[1] was None, but couldn't figure out how to do that in C++. Any tips ?
if (tuple[1].ptr() == object().ptr()) ... -- Dave Abrahams Boost Consulting http://www.boost-consulting.com
participants (2)
-
Baptiste Lepilleur -
David Abrahams