c++类型特征概述
C++ Type Traits Overview
有没有人把标准<type_traits>
(GCC-4.6.1)和Boost自己的<boost/type_traits.hpp>
中可用的所有类型特征的列表放在一起?
完整的特征列表可在网上获得:
- Boost文档列出了
<boost/type_traits.hpp>
中的特征; - c++ 0x草案列出了
<type_traits>
中的特性。
然而,GCC的实现还没有完成。缺少GCC 4.6:
-
std::underlying_type
性状。 -
std::is_trivially_X
系列性状。相反,它有std::has_trivial_default_constructor
和类似的名字似乎来自早期的草案。关于移动构造函数的那个缺失了。 -
std::is_nothrow_X
系列性状。它们也使用较旧的名称,如std::has_nothrow_default_constructor
。关于移动构造函数的那个也不见了。 -
std::aligned_union
性状。这可以很容易地实现在std::aligned_storage
方面,这是目前支持的。
相关文章:
- 如何将高维数据映射到特征类型?
- 将平面阵列重塑为复杂的特征类型
- 以特征类型作为参数的泛型函数回调
- 如何通过opencv中的程序参数定义特征类型?
- 在编译时检查特征类型保存的数据在内存中是否连续
- 专门针对特征类型的功能
- 具有特征类型输出的特征二进制 Expr
- 使用具有STL容器和STD :: vector的特征类型
- 从指针进行特征3类型的强制转换/复制(溢出uint8_t)
- 使用 python 扩展在 gdb 中打印特征类型时出现问题
- 将特征类型与 boost::bind 一起使用是否会自动违反 Eigen 的"only pass by reference"规则?
- NVIDIA NVCC 在使用模板特征类型时更改编译时间常量
- 固定大小的特征类型作为参数
- 特征类型类型定义失败,并显示 C4430
- 检查类型是否为特征 3 类型
- 传递std::迭代器,指向具有特征类型的向量
- visual studio 2012中对特征类型向量的自动矢量化表现不佳
- 子类特征类型
- 使用一个特征类型内提升图
- 特征c++类型转换