随笔分类 -  Notes for Effective STL

I have read serveral classic C++ books, but made no notes, and find it not efficient to do so. So I decide to write down the key point of every item, and share to friends online.
摘要:1. It's generally less work to write the code using the range member functions.Or you'd have to write an explicit loop, and the loop also happens to impose an efficiency penalty.2. Range member functi... 阅读全文
posted @ 2009-08-23 22:49 Aldrich 阅读(381) 评论(0) 推荐(0)
摘要:empty is a constant-time operation for all standard containers, but for some list implementations, size takes linear time. 阅读全文
posted @ 2009-08-23 22:06 Aldrich 阅读(179) 评论(0) 推荐(0)
摘要:This item is simple.Whether you put an object into a container, get an object from it or move objects in a container, the copying thing happens.The slicing problem should be avoided, this is an easy w... 阅读全文
posted @ 2009-08-23 08:44 Aldrich 阅读(159) 评论(0) 推荐(0)
摘要:The key point is that don't go too far inwritting code that apply to more than one container.Generally, choose the best container for you program is the best choice. 阅读全文
posted @ 2009-08-21 23:27 Aldrich 阅读(149) 评论(0) 推荐(0)
摘要:The foundation of how to choose your containers is the characteristics of those containers, the following question quoted from the book can give you some clues.1. Do you need to be able to insert a ne... 阅读全文
posted @ 2009-08-21 23:20 Aldrich 阅读(204) 评论(0) 推荐(0)