规范库中的vector有一个挪动结构函数(move constructor),它可以承受一个右值并简略地直接将其转换为目的对象,而不是复制容器中的一切元从来完成对象的创立。
基于12个网页-相关网页
析构函数 destructor ; Finalize ; destructor function
结构函数 [计] structure function ; Constructor ; configurations function
构造函数和析构函数 Constructor and Destructor ; Construction and destruction
定义纯虚析构函数 pure virtual destructor
构造函数 Constructor ; constructor function ; ctor ; override
析构函数的异常 Exceptions in Destructors
相位结构函数 phase structure function
析构函数次序 destructor order
管理构造函数和析构函数中的异常
因此,也可以在析构函数中安全地使用断言。
Thus, the assertions can be used safely in destructors, too.
队列类的构造函数和析构函数负责创建和销毁互斥锁,见清单1。
The constructor and destructor of the queue class are responsible for the creation and destruction of the mutex, as shown in Listing 1.
应用推荐