Hi,
I'm curios, why this piece of code does compile?
struct BaseClass
{ void func() {}
}; struct Wrap
{ void func() {}
}; BOOST_PYTHON_MODULE(main)
{ class_<BaseClass>("Base", no_init) .def("func", &Wrap::func) ;
}
I'm asking because a want to do something like this and want to know if it is
UB or not:
struct BaseClass
{ void func() {}
}; struct Wrap
{ static void func(BaseClass &Instance) { Instance.func(); }
}; BOOST_PYTHON_MODULE(main)
{ class_<BaseClass>("Base", init<>()) .def("func", &Wrap::func) ;
}
then in python:
import main main.Base().func()
Thank you
Trigve
_______________________________________________
Cplusplus-sig mailing list
[email protected]
http://mail.python.org/mailman/listinfo/cplusplus-sig