摘要: Usually for every function, there's always a precondition to make it work smoothly, and lots of books tell us to verify these preconditions (use assert(...) or something else). In most cases they are ... 阅读全文
posted @ 2008-12-05 11:03 kasim 阅读(157) 评论(0) 推荐(0) 编辑
摘要: Allocator // new operator can be divided into 3 steps. 1. Allocate the memory(use malloc). 2. Cast the pointer. 3. Construct the object(use placement new, new (p) T(…)). Delete... 阅读全文
posted @ 2008-11-18 19:43 kasim 阅读(522) 评论(0) 推荐(0) 编辑