Created
March 25, 2018 00:03
-
-
Save AustinBrunkhorst/ee94408f4ab0368777a5e868627f13c8 to your computer and use it in GitHub Desktop.
C++ Reflection | Lambda Wrapper
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class DemoClass | |
{ | |
public: | |
int someMethod(int a) | |
{ | |
return a; | |
} | |
}; | |
auto someMethodWrapper = [](Variant &obj, ArgumentList &args) | |
{ | |
auto &instance = obj.GetValue( ); | |
return Variant { | |
instance.someMethod( | |
args[ 0 ].GetValue( ) | |
) | |
}; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment