You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
add lambda related reflection/wrapper functions (#165)
`WrapLambdaFromVariable`: wraps a lambda variable to `std::function`
This is required for codegen and execution, because lambda are types that cannot be expressed.
Without this conversion from lambda to std::function we will not have sufficient type information to execute the lambda.
Example of conversion:
```c++
// from
auto f = [](){ return 1; }
// to
namespace __cppyy_internal_wrap_g {
std::function f = ::f;
}
```
`AdaptFunctionForLambdaReturn`: This wraps a function that returns a lambda to return `std::function`
Example:
```c++
// from
auto f() { return [](){ return 1; }
// to
namespace __cppyy_internal_wrap_g {
auto wrapper_fn(...args) {
return std::function(f(args...));
}
}
```
0 commit comments