Why doesn't C++ have a pointer to member function type?

后端 未结 9 1841
一生所求
一生所求 2020-12-30 07:24

I could be totally wrong here, but as I understand it, C++ doesn\'t really have a native \"pointer to member function\" type. I know you can do tricks with Boost and mem_fu

9条回答
  •  無奈伤痛
    2020-12-30 08:22

    It does.

    For example,

    int (Fred::*)(char,float)
    

    is a pointer to a member function of a class Fred that returns an int and takes a char and a float.

提交回复
热议问题