[C++-sig] function return a shared_ptr

Yoann Chaumy spartan811 at hotmail.com
Wed May 23 09:36:06 CEST 2012



 >If you are returning a smart pointer, there is no need to use a call policy like return_value_policy<...>.  However, you have wrapped the class with boost::shared_ptr and are returning a different kind of shared pointer.  That won't work.  It's easier if you can just use boost::shared_ptr everywhere, but it is also possible to set up conversions for a custom smart pointer.  Ok thank you.  But I have a error, when I try to expose my class :  Assertion failed!
Program: ...
File: libs\python\src\converter\registry.cpp
Line: 207
Expression: slot->m_to_python == 0  I am using MS Visual Express 2010 

 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20120523/01cf3210/attachment.html>


More information about the Cplusplus-sig mailing list