utempl/examples/src/go_interface.cpp

20 lines
359 B
C++

import std;
#include <utempl/utempl.hpp>
struct SomeInterfaceImpl {
int a;
int b;
};
using SomeInterface = utempl::GoInterface<SomeInterfaceImpl>;
struct SomeStruct {
std::int16_t a;
std::int16_t b;
};
inline auto Func(SomeInterface arg) {
std::println("{} {}\n", arg.a, arg.b);
};
auto main() -> int {
Func(SomeStruct{42, 300}); // NOLINT
};