- C++的STL源碼(這個系列也很重要,建議侯捷老師的STL源碼剖析書籍與視頻),其中包括內存池機制,各種容器的底層實現機制,算法的實現原理等)
- STL源碼中的hashtable的實現
- STL中unordered_map和map的區別和應用場景
- STL中vector的實現
- STL容器的幾種迭代器以及對應的容器(輸入迭代器,輸出迭代器,前向迭代器,雙向迭代器,隨機訪問迭代器)
順序容器:vector,deque是隨機訪問迭代器;list是雙向迭代器
容器適配器:stack,queue,priority_queue沒有迭代器
關聯容器:set,map,multiset,multimap是雙向迭代器
unordered_set,unordered_map,unordered_multiset,unordered_multimap是前向迭代器
- STL中的traits技法
type_traits
iterator_traits
char traits
allocator_traits
pointer_traits
array_traits
- vector使用的注意點及其原因,頻繁對vector調用push_back()對性能的影響和原因。