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

后端 未结 9 1847
一生所求
一生所求 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:25

    I think that the answer is that the designers of C++ choose not to have in language the things that could be just as easily implemented in a library. Your own description of what you want gives a perfectly reasonable way to implement it.

    I know it sounds funny, but C++ is a minimalistic language. They did leave to libraries all they could leave to them.

提交回复
热议问题