std::pointer_safety

来自cppreference.com
< cpp‎ | memory

 
 
 
 
定义于头文件 <memory>
enum class pointer_safety {

     relaxed,
     preferred,
     strict

};
(C++11 起)

The scoped enumeration type pointer_safety lists the pointer safety modes supported by C++

[编辑] 枚举常量

pointer_safety::strict Only safely-derived pointers (pointers to objects allocated with new or subobjects thereof) may be dereferenced or deallocated. Garbage collector may be active.
pointer_safety::preferred All pointers are considered valid and may be dereferenced or deallocated. A reachability-based leak detector may be active
pointer_safety::relaxed All pointers are considered valid and may be dereferenced or deallocated

[编辑] 另请参阅

返回当前的指针安全模式
(函数) [编辑]