Why am I not provided with a default copy constructor from a volatile?
我为什么不具有挥发性的默认的复制构造函数?
Default copy constructor does a very simple operation, they will do a bit-wise (member-wise) copy of an object, which means that the object will be copied bit by bit.
如果程序员没有提供拷贝构造函数,那么编译器会自动生成默认的拷贝构造函数。默认的拷贝构造函数会执行简单的操作,即按位拷贝对象。
We all know that the implicit copy constructor operates as follows: default construct all member variables, then assign each member variable the appropriate corresponding value.
我们都知道,这个隐式的拷贝构造函数操作如下:默认构建所有成员变量,然后分配每个成员变量相应的对应值。
You didn't define a copy constructor so a default one was created by the compiler.
你没有定义复制构造函数,默认的是由编译器创建的。
Understand and master the constructor, destructor, copy constructor, default constructor and default constructor parameters, to define methods and objects of the structure and the role of withdrawal.
理解并掌握构造函数、析构函数、拷贝构造函数、默认构造函数和缺省参数的构造函数的含义、定义方法以及在对象的构造和撤消中的作用。
Often I desire a copy constructor which initializes each member variable as a copy, rather than default constructing and then assigning. e. g.
经常我渴望一个拷贝构造函数初始化成员变量作为一个副本,而不是默认的构造,然后分配。
The idea is to create a protected copy constructor aside from the default constructor.
保护的想法是创建一个拷贝构造函数除了默认构造函数。
The idea is to create a protected copy constructor aside from the default constructor.
保护的想法是创建一个拷贝构造函数除了默认构造函数。
应用推荐