C++ 概念: TriviallyCopyable
来自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:Trivial copy constructorThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. - 琐碎的移动构造函数Original:Trivial move constructorThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. - 简单拷贝赋值运算符Original:Trivial copy assignment operatorThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. - 琐碎的举动赋值运算符Original:Trivial move assignment operatorThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. - 平凡的析构函数Original:Trivial destructorThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. - No virtual functions or virtual base classes
- All (non-static) members and base classes are TriviallyCopyable
[编辑] 注释
- Other than the other requirements, trivial constructor, assignment and destructor must be defined implicitly (not user-provided)
- Scalar types and arrays of TriviallyCopiable objects are TriviallyCopiable as well
[编辑] 另请参阅
| (C++11) |
checks if a type is trivially copyable (类模板) |