class connection { using THIS_CLASS = connection; static void callback(void* payload) { THIS_CLASS* self = (THIS_CLASS*) payload; ... } };