C++ 概念: StandardLayoutType

来自cppreference.com

指定一个类型是标准的布局类型。标准配置的类型与在其他编程编写的代码进行通信,可用于语言
Original:
Specifies that a type is 标准的布局类型. Standard layout type are useful for communicating with code written in other programming languages.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
注意,该标准没有定义或概念,这个名字的命名要求。这是一种由核心语言定义的类别。作为唯一的一致性的概念,它包括在这里.
Original:
Note, that the standard doesn't define a named requirement or concept with this name. This is a type category defined by the core language. It is included here as concept only for consistency.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[编辑] 要求

  • 所有非静态成员和基类是标准的布局类型(符合要求的StandardLayoutType
    Original:
    All non-static members are and base classes are 标准的布局类型 (meets the requirements of StandardLayoutType
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • 没有虚函数或虚基类
    Original:
    Has no virtual functions or virtual base classes
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • 所有非静态成员有相同的访问控制
    Original:
    All non-static member have the same 访问控制
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • 第一非静态成员类型是不是一个基类
    Original:
    The first non-static member type is not a base class
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.

[编辑] 另请参阅

检查如果一个类型是标准的布局类型
Original:
checks if a type is standard-layout type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(类模板) [edit]