I'm adding return value call policies to methods of a class as follows: mb.class_("SerialStore").member_functions(lambda decl: decl.name.startswith("getSim")).call_policies = \ call_policies.return_internal_reference()
-------------------------------------------------------------------------------------------------------------------------- During generation, I get the following warning: WARNING: boost::container::list<unsigned char,boost::interprocess::allocator<unsigned char, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void>, 0ull>, boost::interprocess::iset_index> > > * SerialStore::getSimicsInput() [member function] > compilation error W1050: The function returns > "boost::container::list<unsigned > char,boost::interprocess::allocator<unsigned char, > boost::interprocess::segment_manager<char, boost::interprocess::rbtree > _best_fit<boost::interprocess::mutex_family, > boost::interprocess::offset_ptr<void>, 0ull>, > boost::interprocess::iset_index> > > *" type. You have to specify a > call policies.Be sure to take a look on `Py++` defined call policies -------------------------------------------------------------------------------------------------------------------------- Here is the generated code for that method that appears to have the call policy specified: { //::SerialStore::getSimicsInput typedef ::boost::container::list<unsigned char,boost::interprocess::allocator<unsigned char, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void>, 0ull>, boost::interprocess::iset_index> > > * ( ::SerialStore::*getSimicsInput_function_type )( ) ; SerialStore_exposer.def( "getSimicsInput" , getSimicsInput_function_type( &::SerialStore::getSimicsInput ) , bp::return_internal_reference< >() ); } _______________________________________________ Cplusplus-sig mailing list Cplusplus-sig@python.org http://mail.python.org/mailman/listinfo/cplusplus-sig