金庆的专栏

  C++博客 :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理 ::
  423 随笔 :: 0 文章 :: 454 评论 :: 0 Trackbacks
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联合。


(转载请注明来源于金庆的专栏)
posted on 2008-04-01 10:03 金庆 阅读(1330) 评论(0)  编辑 收藏 引用 所属分类: 1. C/C++

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理