POD相关定义的翻译
POD(Plain Old Data,普通旧式数据)的定义中,有三个相关的术语:
(C++-98:9;4)
A POD-struct is an aggregate class that has no non-static data members of type pointer to member, non-POD-struct, non-POD-union (or array of such types) or reference, and has no user-defined copy assignment operator and no user-defined destructor. Similarly, a POD-union is an aggregate union that has no non-static data members of type pointer to member, non-POD-struct, non-POD-union (or array of such types) or reference, and has no user-defined copy assignment operator and no user-defined destructor. A POD class is a class that is either a POD-struct or a POD-union.
POD结构(POD-struct)是一个聚合类,它没有以下类型的非静态数据成员:
指向成员的指针、非POD结构、非POD联合(或以上类型的数组),或它们的引用,
并且没有用户自定义的拷贝赋值运算符,也没有用户自定义的析构函数。
类似的,POD联合(POD-union)是一个聚合联合,
它没有以下类型的非静态数据成员:
指向成员的指针、非POD结构、非POD联合(或以上类型的数组),或它们的引用,
并且没有用户自定义的拷贝赋值运算符,也没有用户自定义的析构函数。
POD类(POD class)是一个类,它要么是POD结构,要么是POD联合。
(转载请注明来源于金庆的专栏)