Open raychenv opened 1 year ago
仿函数
// this is a functor struct add_x { add_x(int val) : x(val) {} // Constructor int operator()(int y) const { return x + y; } private: int x; };
https://stackoverflow.com/questions/356950/what-are-c-functors-and-their-uses https://zhuanlan.zhihu.com/p/75353199
仿函数
https://stackoverflow.com/questions/356950/what-are-c-functors-and-their-uses https://zhuanlan.zhihu.com/p/75353199