通过实验分析了各内存拷贝函数拷贝速度与拷贝内存量之间的对应关系。
An experiment is conducted to analyze the relations between the velocity of every memory copy function and the size of memory to be copied.
将这些值拷贝到传递给这个函数的行参数中。
Copy the values to the formal parameters passed to this function.
如果一个函数要频繁的使用全局变量,我们可以使用局部变量,作为全局变量的拷贝,这样就可以使用寄存器了。
If a function USES global variables heavily, it is beneficial to copy those global variables into local variables so that they can be assigned to registers.
尽管此处并没有列出拷贝和挂载初始RAM磁盘所涉及的所有函数,但是这足以为我们提供一个整体流程的粗略框架。
Not all functions that are involved in copying and mounting the initial RAM disk are shown here, but this gives you a rough overview of the overall flow.
这通常意味着从SPE的本地存储中拷贝参数,在用户线程中运行各自的库函数,并通过再次调用ioctl继续执行。
This usually means copying the arguments over from the spe local store, running the respective library function in the user thread, and continuing by calling the ioctl again.
清单2显示了产生编译时错误的代码部分,因为该拷贝构造函数是私有的。
Listing 2 shows a piece of code that results in a compile-time error because the copy constructor is private.
这些属性不在现在被设定;函数只是简单的被拷贝到对象。
These properties will not be set now; the function is simply being copied to the object.
您知道Set有一个拷贝构造函数。
如果你没有为拷贝构造函数写正确的代码,就有可能造成list中对象的某些数据成员没有初始化。
If you do not write a correct code for the copy constructor, object within a list will have some data members uninitialized.
拷贝构造函数是一种特别的构造函数,用于复制已经存在的对象到新生成的对象,这是一种高效的方式。
The copy constructor is a special kind of constructor which creates a new object which is a copy of an existing one, and does it efficiently.
每个类(其实例要在容器内使用)必须至少实现拷贝构造函数(实现赋值运算符,也是好习惯)。
Each class whose instance will go into the container must implement at least the copy constructor it is good to implement also the assignment operator.
建模构造函数、分析构造函数,以及拷贝构造函数。
你应该创建一个拷贝构造函数的每个对象自己。
You should create a copy constructor for each object yourself.
对于类对象包含指针的情况下,我们要编写自己的拷贝构造函数,这样可以防止上述情况的发生。
For a situation where an object contain Pointers we have to write our own copy constructor that will prevent situations like those mentioned above.
在第一种情况下,你基本上是声明一个私有拷贝构造函数,然后没有提供任何实现。通过声明他们私人,非成员国不能复制它。
In the first case, you are essentially declaring a private copy constructor and then not providing any implementation. By declaring them private, non-members cannot copy it.
你的第一个解决方案向读者传达,拷贝构造函数是私有的,不能使用。
Your first solution conveys to the reader that the copy-constructor is private and is not to be used.
这个函数创建了一个现有的结点的拷贝,因此您能将它添加到其它的地方。
This function makes a copy of an existing node so that you can add it somewhere else.
传统的方式来解决这个是声明拷贝构造函数私有和未实现的。
The traditional way to solve this is to declare the copy-constructor private and to leave it unimplemented.
如果程序员没有提供拷贝构造函数,那么编译器会自动生成默认的拷贝构造函数。默认的拷贝构造函数会执行简单的操作,即按位拷贝对象。
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.
拷贝构造函数只在需要的情况下动态内存分配吗?
Copy constructor is needed only in the case of dynamic memory allocation?
这是一个有效的拷贝构造函数吗?
由于模板构造函数终究不是拷贝构造函数,因此这种模板的出现并不会隐藏原来隐含的拷贝构造函数之声明。
Because a template constructor is never a copy constructor, the presence of such a template does not suppress the implicit declaration of a copy constructor.
经常我渴望一个拷贝构造函数初始化成员变量作为一个副本,而不是默认的构造,然后分配。
Often I desire a copy constructor which initializes each member variable as a copy, rather than default constructing and then assigning. e. g.
放在单独的功能调用析构函数和拷贝构造函数和赋值运算符你所需要的功能。
Put the functionality you need in separate functions called by the destructor and the copy constructor and the assignment operator.
问题:手动编写一个拷贝构造函数的初始化每个成员变量作为副本很乏味,和近乎荒谬的成员变量数量的增加。
Question: Manually writing a copy constructor which initializes each member variable as a copy is very tedious, and verges on ridiculous as the number of member variables grows.
有什么方法可以利用隐式的拷贝构造函数初始化列表吗?有没有其他方式手动编写初始化列表吗?
Is there any way to make the implicit copy constructor use initialization lists? Is there any other way around manually writing the initialization list?
现在拷贝构造函数是一个好方法。
保护的想法是创建一个拷贝构造函数除了默认构造函数。
The idea is to create a protected copy constructor aside from the default constructor.
调用拷贝构造函数不存在!
赋值运算符是应用于一个初始化的对象,但这并不是拷贝构造函数的情况下。
The assignment operator is applied on a initialized object, but this is not the case in the copy constructor.
应用推荐