[C++-sig] Re: operator ->, cast operator

Leonard "paniq" Ritter paniq at paniq.org
Sun Mar 13 01:51:03 CET 2005


>Use make_constructor to register the constructor for the smart pointer
>in the View export.
>  
>

exportedClass.def("__init__",make_constructor(New<ClassType>));

did it, rox. thanks again! this gives me plenty of ideas to solve other 
comfortability-issues as well. :)

>Sure; just make thin wrapper functions that take a Ptr<View>& as the
>first argument and then def them.  In fact, I don't think you need the
>thin wrappers and you can just 
>
>  .def("foo", &Ptr<View>::foo)
>
>in your class_<View,...> construct.
>  
>
will try that when time comes and give feedback




More information about the Cplusplus-sig mailing list