阅读背景:

如何测试指针类型是否可以安全地转换为另一种potiner类型?

来源:互联网 

I'm trying to build a pointer class with conversion safeguards in it to monitor pointer conversions. Specifically, I want it to do a dynamic_cast inside of an assert and make sure the result is not a nullptr. Unfortunately, if the pointer does not point to a class type, it gives a compile-time error indicating that dynamic_cast cannot be used.I'm trying to build a pointer class with conver




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: