Simon 's Blog
» 做笔记做笔记
Toggle navigation
Simon 's Blog
HOME
总裁介绍
coper
zongcai
what
ARCH
TAGS
navigation
标签 - STL源码
STL仿函数
? STL源码 ?
? STL仿函数 ?
2019-07-24 14:55:51
531
0
0
[TOC] # 一元仿函数(unary_function) ## 内嵌型别(参数和返回型别,STL中迭代器的`型别萃取机`类似实现) ``` template struct unary_function { typedef Arg argument_type; typedef Result result_type; }; ``` ## 仿函数 ``` template struct di
stl::set算法
? STL源码 ?
? STL算法 ?
2019-07-22 20:31:23
311
0
0
[TOC] # 并集 ``` int a[] = { 1,2,3,4,5,6, 7}; int a1[] = { 1,1,2,3,4,5,6,8,10 }; std::ostream_iterator oiter(std::cout, " "); std::multiset set1(a, a + 7); std::multiset set2(a1, a1 + 9); std
stl算法实现(lower_bound,upper_bound,binary_search,find,find_if,next_premutation,prev_premutation)
? STL源码 ?
? STL算法 ?
2019-07-22 20:27:44
636
0
0
[TOC] # 解释 - lower_bound 可插入value的第一个位置 - upper_bound 可插入value的最后一个合适的位置 # lower_bound ``` template inline ForwardIterator __mylower_bound(ForwardIterator first, ForwardIterator second, const T &va
HashTable实现
? hashtable ?
? 数据结构 ?
? STL源码 ?
2019-07-16 19:39:35
387
0
0
# 整数 hash(126) = (1 * 10^2+2 * 101+6 * 10^0) # 字符串 hash(code) = (c * B^3 + o * B^2 + d * B^1 + e * B^0)
带你深入理解STL之迭代器和Traits技法
? STL源码 ?
? StL迭代器 ?
2019-07-04 11:28:24
136
0
0
引用自[带你深入理解STL之迭代器和Traits技法](https://blog.csdn.net/terence1212/article/details/52287762)
空间配置std::alloc
? STL源码 ?
? 空间配置 ?
2019-06-30 15:57:24
32
0
0
[TOC] # 设计哲理 - 向system heap申请空间 - 考虑多线程状态 - 考虑内存不足时的应变措施 - 考虑“小块”造成内存碎片问题