All classes have constructors, whether you define one or not, because Java automatically provides a default constructor that initializes all member variables to zero.
另一方面,移动构造函数可以只复制指针,然后将源中的指针设置为null。
The move constructor, on the other hand, can just copy the pointer and then set the pointer in the source to null.
Synchronized构造函数没有意义,因为当对象创建时,只有创建对象的那个线程才能访问它。
Synchronizing constructors doesn't make sense, because only the thread that creates an object should have access to it while it is being constructed.
请注意,您只能链接到一个构造函数,并且它必须是构造函数主体中的第一条语句。
Note that you can only chain to one constructor, and it has to be the first statement in your constructor body.
在访问任何静态字段之前,都将自动调用静态构造函数,它们通常用于初始化静态类成员。
Static constructors are called automatically, immediately before any static fields are accessed, and are generally used to initialize static class members.
从3.0版开始,C++11根据需要声明了两个额外的特殊成员函数:移动构造函数和移动赋值运算符。
Since version 3.0, C++11 declares two additional special member functions on demand: the move constructor and the move assignment operator.
如您所见,我们首先创建一个内置类型符号的实例,然后将其作为参数传递给VarSymbol的构造函数。
As you can see, we first create an instance of a built-in type symbol and then pass it as a parameter to VarSymbol‘s constructor.
当然,构造函数也可以被重载,这意味着我们可以定义多个构造函数,名称相同,但接受不同的参数。
Of course, a constructor can be overloaded as well, meaning we can have several constructors, with the same name, but different parameters.
The decision is based on two factors: whether an ambient transaction is present and the value of the TransactionScopeOption parameter in the constructor.
English
Bahasa indonesia
日本語
عربى
Български
বাংলা
Český
Dansk
Deutsch
Ελληνικά
Español
Suomi
Français
עִברִית
हिंदी
Hrvatski
Magyar
Italiano
Қазақ
한국어
മലയാളം
मराठी
Bahasa malay
Nederlands
Norsk
Polski
Português
Română
Русский
Slovenský
Slovenski
Српски
Svenska
தமிழ்
తెలుగు
ไทย
Tagalog
Turkce
Українська
اردو
Tiếng việt