POD( Plain Old Data)概念:

Arithmetic types (3.9.1), enumeration types, pointer types, and pointer to member types (3.9.2), and cv-qualified(注2) versions of these types (3.9.3) are collectively called scalar types. Scalar types, POD-struct types,POD-union types (clause 9), arrays of such types and cv-qualified versions of these types (3.9.3) are collectively called POD types. 
 
如果一个class没有non-trivial 的 constructor, destructor, 以及 copy assignmet operator这些东西的话,这个class事实上已经退化成一个POD类型了,就相当于C中的struct。
 
POD类型包括下面类型:
1、标量类型,c/c++的基本类型
  • signed integer types (signed char, short, int, long),
  • unsigned integer types (unsigned char,unsigned short, unsigned int,unsigned long),
  • char and wchar_t, and
  • bool.
  • float, double, and long double
  • pointer-to-void (void *),
  • pointer-to-object and pointer-to-static-member-data (both of the form T* when pointing to an object of typeT), and
  • pointer-to-function and pointer-to-static-member-function (both of the form T (*)(...) when pointing to a function that returns an object of typeT).
  • pointer-to-nonstatic-member-data (of the form T C::* when pointing to one of classC's data members that has type T), and
  • pointer-to-nonstatic-member-functions (of the form T (C::*)(...) when pointing to one of classC's member functions that returns an object of typeT).
2、用户自定义的类类型:
  • non-static data (including arrays) of any pointer-to-member type,
  • non-static data (including arrays) of any non-POD class type,
  • non-static data of any reference type,
  • user-defined copy assignment operator, nor
  • user-defined destructor.
  • user-declared constructors,
  • private or protected non-static data members,
  • base classes, nor
  • virtual functions.

最新文章

  1. The PHP Package 之 monolog[转]
  2. MMORPG大型游戏设计与开发(客户端架构 part14 of vegine)
  3. [Android Pro] root用户删除文件提示:Operation not permitted
  4. C# 调用 WebService 连接ORACLE 11g
  5. Ember Charts – 基于 Ember & D3 的图表库
  6. 20160127.CCPP体系详解(0006天)
  7. [转] C++中临时对象及返回值优化
  8. Swift基础语法学习总结一
  9. 如何在UILable上添加点击事件?
  10. Shell:进程的层级关系
  11. JavaScript面向对象(三)——继承与闭包、JS实现继承的三种方式
  12. Java基础巩固——异常
  13. urllib2 post请求方式,带cookie,添加请求头
  14. ios 拉伸图片和计算文字的大小
  15. leetcode210
  16. oracle lpad rpad函数
  17. c语言基础笔记
  18. 【转】python 字符编码与解码——unicode、str和中文:UnicodeDecodeError: 'ascii' codec can't decode
  19. javascript大神修炼记(4)——循环
  20. PHP超全局变量数组

热门文章

  1. 8.9zju集训日记
  2. 多线程DP (要一起行动才可以)
  3. java mybatis学习一
  4. LocalDate test
  5. 如何避免遗漏bug
  6. 配置中心:Nacos, Apollo, Consul, Etcd
  7. Python Pandas -- Panel
  8. Maven 的setting.xml
  9. LISP语言学习资源
  10. UGUI 切割图片