I use pybind11 as a wrapper of my C++ code into a python library.
It happens that there are arguments that I can't provide or sometimes I want to do a conversion/initialization that I know in the C++ side. It could be because the class is not known in python, for instance. How could that be done? The only "solution" I see so far would be to create an inherited proxy class in C++.
Example: I want to define/bind a python class A:
class A:
def __init__(self, B b):
...
With a C++ equivalent class:
class A {
A(C c, D d);
}
Is there some kind of lambda or an equivalent that I could create for the pybind11::init<>?