Accessing through a pointer that doesn't point to anything is a major source of errors, and very hard to avoid in many traditional C or C++ styles of programming. For example, a pointer might be uninitialized, the nullptr, point beyond the range of an array, or to a deleted object.
通过没有指向任何内容的指针进行访问是错误的主要来源之一,这在许多传统的C或C ++编程风格中很难避免。例如,指针可能未初始化,空指针,指向数组范围之外或指向已删除的对象的指针。
See the current design specification here.
请参阅下面的最新设计规范。
https://github.com/isocpp/CppCoreGuidelines/blob/master/docs/Lifetime.pdf
Lifetime safety profile summary(声明周期安全群组摘要):
Once completely enforced through a combination of style rules, static analysis, and library support, this profile
通过结合样式规则,静态分析和库支持彻底实施后,此规则群组
原文链接
https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#prolifetime-lifetime-safety-profile