std::pointer_safety
STD::指针[医]安全
Defined in header | | |
---|---|---|
enum class pointer_safety { relaxed, preferred, strict }; | | (since C++11) |
范围枚举类型pointer_safety
列出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 |
另见
get_pointer_safety (C++11) | returns the current pointer safety model (function) |
---|
© cppreference.com
在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。