1 2 3 4 5 6 7 8 9 10 11 12 13 14
#include <stdio.h> namespace space { template <typename FuncT> void templated_trampoline(FuncT func) { func(); } } typedef void (*FuncPtr)(); extern "C" void cpp_trampoline(FuncPtr func) { space::templated_trampoline(func); }