首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

PODType

指定类型为POD%28平原旧数据%29类型。这意味着该类型与C编程语言中使用的类型兼容,可以使用C库函数进行操作:它可以用std::malloc,可以用std::memmove等,并且可以直接与C库进行二进制交换。

请注意,标准%27T使用此名称定义了命名的需求或概念。这是一个由核心语言定义的类型类别。在这里,它只是为了一致性而作为概念来包含。

所需

要么:

  • 阿标量型;
  • 类类型%28classstructunion%29,即:

an aggregate type; has no non-static members that are non-POD; has no members of reference type; has no user-defined copy constructor; has no user-defined destructor;

(until C++11)

a trivial type; a standard layout type; has no non-static members that are non-POD;

(since C++11)

  • 安集料类型;
  • 没有非静态的非POD成员;
  • 没有参考类型的成员;
  • 没有用户定义的复制构造函数;
  • 没有用户定义的析构函数;

%28直到C++11%29

  • 阿平凡型;
  • 阿标准布局类型;
  • 没有非静态的非POD成员;

%28自C++11%29

  • 这种类型的数组。

另见

is_pod (C++11)

checks if a type is plain-old data (POD) type (class template)

代码语言:txt
复制
 ? cppreference.com

在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com