3种构造语义:构造函数constructor拷贝构造copy constructor拷贝赋值运算符copy assignment operator构造函数S()出厂设置拷贝构造S(const S other)把A的数据复制给B。B(A);拷贝赋值运算符S operator=(const S other) ...
好记性不如烂博客;stl源码剖析那本书不想看,没事(有事懒得做)看看微软的vector实现。以vectorint 为例template class _Ty, class _Alloc = allocator_Ty class vector { // varying size array of values privat ...