Disabling “bad function cast” warning

后端 未结 3 1021
傲寒
傲寒 2020-12-11 02:43

I\'m receiving the following warning:

warning: converting from \'void (MyClass::*)(byte)\' to \'void (*)(byte)\'

This is because I need to

3条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-11 03:06

    Also, this may be helpful

    union FuncPtr    
    {
      void (* func)(MyClass* ptr, byte);
      void (MyClass::* mem_func)(byte);
    };
    

提交回复
热议问题