callback 函数

什么函数有资格在 C++ 程序中作为 callback 函数?

全局函数

static 成员函数

  • 非 static 成员函数的参数表中带有 this 指针,会造成 callback 函数类型不匹配