我有一个包含 QVariant 的 std::array 的类:
class MyClass()
{
typedef std::array<QVariant, 42> attribs_t;
attribs_t m_Attribs;
public:
MyClass()
{
m_Attribs[0] = 41;
}
};
我现在使用 Intel Parallel 检查器分析了这个项目,它检测到
“未初始化的内存访问”m_Attribs[0] = 41;
我必须手动调用 std::array 中元素的构造函数还是误报?