网志档案列表:5 / 2006

Effective STL 3: Make copying cheap and correct for objects in containers @ 5/20/2006

When you insert/push an object into a container, or when you move objects around the container, they get copied. If copying f...
发布于 5/20/2006 19:18:24 | 评论:0

Effective STL 1: Choose your containers with care @ 5/19/2006

Contiguous-memory containers: vector deque string rope (heavy-duty string) Node-based containers: all the others...
发布于 5/19/2006 20:40:13 | 评论:0

More Effective C++ 28: Smart pointers @ 5/8/2006

1. auto_ptr is included in <memory>. 2. assignment is done by ownership transfer [code] auto_ptr<string> p1(new string("hello...
发布于 5/8/2006 19:32:00 | 评论:1

More Effecitve C++ 27: Requiring or prohibiting heap-base objects @ 5/7/2006

1. When created using new, objects are placed on the heap, otherwise on the stack. However, static objects are placed neither on...
发布于 5/7/2006 14:27:35 | 评论:0

More Effective C++ 26: Limiting the number of objects of a class @ 5/2/2006

1. Make the constructors private to control the constructing of objects. 2. Declare public peudo-constructors whichby clients g...
发布于 5/2/2006 16:07:02 | 评论:0