c++ 函数适配器,模板的运用:count_if,less,bind2nd,binder2nd
下面这小小的一个函数,包含了模板的基本应用,学习标准库基本内容来提高对模板的认识。
#include <vector>
#include <iostream>
#include <functional>
#include <algorithm>
int main(int argc char** argv) {
std::vector<int> tmp_vac = {
3, 4, -6, 10, 2, -9
};...
原创
2022-04-15 22:42:44 ·
895 阅读 ·
0 评论