[C++-sig] Re: set_wrapper

David Abrahams dave at boost-consulting.com
Tue May 27 21:24:49 CEST 2003


Giulio Eulisse <giulio.eulisse at cern.ch> writes:

> If I have a simple class
>
> class A {}
>
> and a function 
>
> void f_A(void){...}
>
> pyste's set_wrapper(A.f,"f_A") should, IMHO, generate
>
> class_< A >("A", init<  >())
>         .def(init< const A & >())
>         .def("f", &f_A)
>     ;
> even if A::f() is not present. Is there a reason why it doesn't?

Maybe because that couldn't work.  Have you tried to compile and use
the wrapping code above from python?

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com





More information about the Cplusplus-sig mailing list