How can it be useful to overload the “function call” operator?

后端 未结 7 467
终归单人心
终归单人心 2020-12-02 20:43

I recently discovered that in C++ you can overload the \"function call\" operator, in a strange way in which you have to write two pair of parenthesis to do so:



        
7条回答
  •  借酒劲吻你
    2020-12-02 21:35

    If you're making a class that encapsulates a function pointer, this might make the usage more obvious.

提交回复
热议问题