前端之家收集整理的这篇文章主要介绍了
为什么VC C4150(删除指针到不完整的类型)只有一个警告?,
前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
当然,警告必须对待,但为什么VC
C4150(
删除指针不完整的类型)只有一个警告?
因为标准说这是合法的,虽然是危险的:5.3.5
If the object being deleted has incomplete class type at the point of deletion and the complete class has a non-trivial destructor or a deallocation function,the behavior is undefined.
原文链接:https://www.f2er.com/c/112135.html