Currently, implicitly-defined constructors aren't automatically specified as constexpr even when they would fulfill all the requirements to be so:.
车辆合约的构造函数接收三个属性:model,make和vin,后者可用于识别特定车辆。
The vehicle contract's constructor receives three properties: model, make, and vin, the latter of which can be used to identify that particular vehicle.
构造函数:如果可能,应该在所有的构造函数中初始化所有的数据成员。
Initialise all member data in all constructors, if possible.
如果你的类没有明确的超类,那么它有一个隐含的Object的超类,它有一个无参数的构造函数。
If your class has no explicit superclass, then it has an implicit superclass of Object,which does have a no-argument constructor.
仅提供静态工厂方法的主要缺点是没有公共或受保护的构造函数的类不能被子类化。
Providing only static factory methods makes it impossible to subclass classes without public orprotected constructors.
如你所知,在C++中,当你声明了任何的构造函数,编译器就不会为你生成默认的构造函数。
As you know, in C++ when you declare any constructor, the compiler will no longer generate the default constructor for you.
派生类只能继承其基类的所有构造函数,无法只继承特定的基础构造函数。
A deriving class can only inherit all the constructors of its base class, there is no way to inherit only specific base constructors.
继承意味着一个类隐式地包含其基类的所有成员,但基类的构造函数除外。
Inheritance means that a classimplicitly contains all members of its base class, except for the constructors of the base class.
这些步骤或是会产生一个编译时错误,或是确定一个可以在运行时调用的T的构造函数。
These steps either result in a compile-time error, or determine a constructor on T that can be invoked at run-time.
用C++的说法,~GCRoot是GCRoot的析构函数,所以我们可能想找到GCRoot的构造函数。
In C++ parlance,~GCRoot is the destructor of GCRoot,so we may want to find the constructor of GCRoot.
程序员只能定义另外的带有一个或多个参数的构造函数。
The programmer can only define additional constructors with one or more arguments.
记住,你只能连接到一个构造函数,而且它必须是你的构造函数体中的第一句。
Note that you can only chain to one constructor, and it has to be the first statement in your constructor body.
如果有不止一种方法可以做到,创建多个显示不同组合的构造函数。
If there's more than one way to do it, create multiple constructors that show the different combinations.
仅提供静态工厂方法的主要缺点是没有公共或受保护的构造函数的类不能被子类化。
The main disadvantage of providing only static factory methods is that classes without public orprotected constructors cannot be subclassed.
中文
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