Effective C++/More Effective C++的作者Scott Meyers即将推出最新力作:Effective STL, 该书目前已经完成,相信不久可以问世。但是与中国读者见面恐怕还是要在苦等之后。Addison=Wesley已经刊出了此书的页面。地址http://cseng.aw.com/book/toc/0,3830,0201749629,00.html
下面是该书的内容:
某些条款我基本可以理解,大部分知道应该如此,但不知其所以然,某些条款令我相当诧异,所以更希望能够早日拜读。我对于某些条款的感想用[]写在下面,我相信也是Meyers书中能够解释的东西。如果对于STL感兴趣的网友能够就这些条款展开讨论,我相信是非常有帮助的。
1. Containers
Item 1: Choose your containers with care.
Item 2: Beware the illusion of container-independent code.
[值得注意的条款!]
Item 3: Make copying cheap and correct for objects in containers.
[可以理解,可是如何做到cheap,哪些情况下容易作出不正确的copy操作?]
Item 4: Call empty instead of checking size against zero.
[何故?]
Item 5: Prefer range member functions to their single-element counterparts.
[何故?]
Item 6: Be alert for C++'s most vexing parse.
[谈何容易!]
Item 7: When using containers of newed pointers, remember to delete the pointers before the container is destroyed.
[可以理解]
Item 8: Never create containers of auto_ptrs.
[可以理解]
Item 9: Choose carefully among erasing options.
[非常令我感兴趣的条款]
I