[C++-sig] boost-python + lambda

Neal D. Becker ndbecker2 at verizon.net
Wed Apr 7 19:26:05 CEST 2004

I'd like to wrap a class, but with a modified interface to some member
functions.  The easy way is write c++ code to wrap the class, inherit from
it, and add the new member function, then expose that.

I wonder if lambda can be used as a more direct approach?  If so, what would
the syntax look like?

struct A {
  some_function (sig1);

  class_<A> ("A")
    .def(some_function2 ( insert lambda here? )

More information about the Cplusplus-sig mailing list