Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void c_func(void(*ptr)()) {
- ptr();
- }
- void c_func_helper() {
- try {
- throw;
- } catch(std::function<void()>& func) {
- func();
- }
- }
- void call_c_func_with_function(std::function<void()> func) {
- try {
- throw func;
- } catch(std::function<void()>& func) {
- c_func(c_func_helper);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement