C++ 概念: CopyConstructible
来自cppreference.com
|
|
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
指定的类型的一个实例可以复制构造(复制).
Original:
Specifies that an instance of the type can be copy-constructed (copied).
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
这个概念意味着
MoveConstructible.Original:
This concept implies
MoveConstructible.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[编辑] 要求
该类型必须实现以下功能:1
Original:
The type must implement the following functions:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Type::Type
| Type::Type( Type& other ); Type::Type( const Type& other ); |
(的变种之一就足够了) | |
拷贝构造函数: constructs an instance of a type with the contents of other. The internal state of other is not modified.
The following expressions must have the specified effects:
| 表达
Original: Expression The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Effects |
| Type a = v; | a是相当于v,rvType是一个实例。 v必须保持不变.Original: a is equivalent to v, where rv is an instance of Type. v must be unchanged.The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
| Type(v); | Type是一个实例vv,相当于一个临时对象类型Type。 v必须保持不变. Original: a temporary object of type Type is equivalent to v, where v is an instance of Type. v must be unchanged. The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
[编辑] 另请参阅
| (C++11) (C++11) (C++11) |
一类的检查,如果有拷贝构造函数 Original: checks if a type has a copy constructor The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (类模板) |