Can we implement c++ thunk in linux?
问题 I want to use class member functions as callbacks, I don't use libsigc, because it's slow. In ATL, we can use member function for C-style callback(http://www.codeproject.com/KB/cpp/SoloGenericCallBack.aspx), so can we implement c++ thunk in linux? The code below will crash: #include <assert.h> #include <stdio.h> #include <sys/mman.h> typedef char BYTE; typedef int DWORD; typedef int* DWORD_PTR; typedef int* INT_PTR; typedef bool BOOL; typedef unsigned long ULONG; typedef unsigned long* ULONG