摘要:
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 ... 阅读全文
摘要:
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... 阅读全文