
Effectiv STL 笔记
ruihuank
这个作者很懒,什么都没留下…
展开
-
Effective STL 21 Always have comparison functions return false for equal values
always have comparison functions return false for equal values原创 2017-08-28 12:00:40 · 184 阅读 · 0 评论 -
Effective STL 43 Prefer algorithm calls to hand-written loops
algorithm & hand-written原创 2017-09-26 16:14:39 · 172 阅读 · 0 评论 -
Effective STL 31 Know your sorting options
sort原创 2017-09-01 20:09:30 · 284 阅读 · 0 评论 -
Effective STL 7 Delete the pointers before the container is destroyed
delete the pointers原创 2017-09-26 18:27:41 · 180 阅读 · 0 评论 -
Effective STL 19 understand the difference between equality and equivalence
difference between equality and equivalence原创 2017-08-27 18:48:07 · 312 阅读 · 0 评论 -
Effective STL 23 Consider replacing associative container with sorted vector
replacing associative container with sorted vector原创 2017-08-29 10:30:15 · 466 阅读 · 0 评论 -
Effective STL 45
count & find & binary_search & lower_bound & upper_bound & equal_range原创 2017-09-28 15:16:14 · 212 阅读 · 0 评论 -
Effective STL 35 Case-insensitive string comparisons via mismatch or lexicographical_compare.
mismatch & lexicographical_compare原创 2017-09-07 09:37:32 · 269 阅读 · 0 评论 -
Effectiv STL 37 Use accumulate or for_each to summarize ranges
accumulate(numeric) &for_each原创 2017-09-21 11:41:28 · 225 阅读 · 0 评论 -
Effective STL 46 Consider function objects instead of functions as algorithm parameters
function objects原创 2017-10-16 15:40:08 · 200 阅读 · 0 评论 -
Effective STL 47 Avoid producing write-only code
avoid producing write-only code原创 2017-10-16 16:19:17 · 282 阅读 · 0 评论 -
Effective STL appendix A Locales and Case-Insensitive String Comparisons
locales and case-insensitive string comparisons原创 2017-10-16 19:58:31 · 190 阅读 · 0 评论 -
Effective 49 learn to deciper STL-related compiler diagnostics
compiler diagnostics原创 2017-10-16 20:43:53 · 296 阅读 · 0 评论 -
Effective STL 28 How to use a reverse_iterator's base iterator
insertvector<int> v;v.reserve(5);// 1 2 3 4 5 for (int i = 1; i <= 5; ++i) { v.push_back(i);}// 1 2 3(ri) 4(i) 5vector<int>::reverse_iterator ri = find(v.rbegin(), b.ren...原创 2017-09-01 10:10:47 · 189 阅读 · 0 评论 -
Effective STL 29 istreambuf_iterators for character-by-character input
istreambuf_iterators for charactor-by-charactor input原创 2017-09-01 10:39:25 · 194 阅读 · 0 评论 -
Effective STL 20 Specify comparison types for associative containers of pointers
Specify comparison types for associative containers of pointers原创 2017-08-28 11:11:22 · 345 阅读 · 0 评论 -
Effective STL 16 pass vector and string data to legacy APIs
pass vector and string data to legacy APIs原创 2017-08-26 21:59:34 · 164 阅读 · 0 评论 -
Effective STL 17 Use "the swap trick" to trim excess capacity
use "the swap trick" to trim excess capacity原创 2017-08-26 21:50:13 · 277 阅读 · 0 评论 -
Effective STL 18 avoid using vector<bool>
avoid using vector<bool>原创 2017-08-27 16:38:41 · 294 阅读 · 0 评论 -
Effective STL 9 erasing options
To eliminate all objects in a container that have a particular value:contiguous-memory container(vector, deque, or staing)c.erase(remove(c.begin(), c.eng(), 1963), c.end());listc.remove(19...原创 2017-08-17 11:24:51 · 269 阅读 · 0 评论 -
Effective STL 22 Avoid in-place key modification in set and multiset
avoid in-place key modification in set and multiset原创 2017-08-28 16:33:42 · 242 阅读 · 0 评论 -
Effective 34 Note which algorithms expect sorted ranges
algorithms expected sorted ranges原创 2017-09-06 14:47:03 · 213 阅读 · 0 评论 -
Effective STL 24 Choose carefully between map::operator[] and map::insert
choose between map::operator[] and map::insert.原创 2017-08-29 17:13:59 · 267 阅读 · 0 评论 -
Effective STL 39 Make predicates pure functions
make predicate pure functions原创 2017-09-25 11:27:24 · 162 阅读 · 0 评论 -
Effective STL 40 Make functor classes adaptable
ptr_fun & unary_function & binary_function & bind1st &bind2nd原创 2017-09-26 09:21:29 · 292 阅读 · 0 评论 -
Effective STL 6 Vexing parse
vexing parse原创 2017-08-31 20:35:28 · 256 阅读 · 0 评论 -
Effective STL 27 convert a container's con_iterators to iterators
Use distance and advance to convert a container's const_iterators to iterators.原创 2017-08-31 20:44:47 · 189 阅读 · 0 评论 -
Effective STL 41 Understand the reasons for ptr_fun, mem_fun, and mem_fun_ref
mem_fun & mem_fun_ref原创 2017-09-26 10:13:31 · 244 阅读 · 0 评论