c++ 谓词中使用了关键字operator重载()小括号
template <typename T1, typename T2> class AbsLess { public: bool operator()(T1& t1, T2& t2) { return t1 < t2; } };
operator加(),是仿函数
https://chuna2.787528.xyz/youxin/archive/2012/07/09/2582530.html
用法参考:
https://chuna2.787528.xyz/txwtech/p/18643016
https://chuna2.787528.xyz/txwtech/p/18636908
欢迎讨论,相互学习。
[email protected]

浙公网安备 33010602011771号