utempl/examples/src/go_interface.cpp

22 lines
349 B
C++
Raw Normal View History

2024-03-01 17:08:25 +00:00
#include <utempl/go_interface.hpp>
#include <fmt/core.h>
struct SomeInterfaceImpl {
int a;
int b;
};
using SomeInterface = utempl::GoInterface<SomeInterfaceImpl>;
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});
};