摘要:
仿函数(函数对象)和适配器可以说是STL中默默无闻的贡献者,它们没有容器、算法和迭代器那么有名, 但是其贡献却很大。 一、仿函数 仿函数又称函数对象,从名字上可以得出,它本质上是 一种具有函数特质的对象, 也即可以像使用函数一样使用该对象。怎么样做?重载operator()运算符即可,有了这个运算符 阅读全文
摘要:
/* @note: 学习C++泛型编程 @date: 2017-11-16 @author: cloudren */ #include <iostream> #include <algorithm> #include <string.h> #include <vector> #include <de 阅读全文
摘要:
位段 针对类或结构中unsigned或in... 阅读全文