[C++-sig] V2: adding new functions to class

Peter Bienstman pbienst at MIT.EDU
Tue Apr 2 21:54:29 CEST 2002


In V2, can I already add functions to a C++ class which were not part of
the original class definition? Something like

class A{};

f();

...
 .add(
  class_<A>("A")
  .def("f", f)
  )
...


These constructs give me compiler errors, like 'cannot convert pointer
to function to PyObject*

Peter 







More information about the Cplusplus-sig mailing list