diff --git a/examples/src/go_interface.cpp b/examples/src/go_interface.cpp new file mode 100644 index 0000000..73ed557 --- /dev/null +++ b/examples/src/go_interface.cpp @@ -0,0 +1,21 @@ +#include +#include + +struct SomeInterfaceImpl { + int a; + int b; +}; +using SomeInterface = utempl::GoInterface; +struct SomeStruct { + short a; + short b; +}; + +inline auto Func(SomeInterface arg) { + fmt::print("{} {}\n", arg.a, arg.b); +}; + + +auto main() -> int { + Func(SomeStruct{42, 300}); +};