Are there practical uses for dynamic-casting to void pointer?

后端 未结 7 1293
隐瞒了意图╮
隐瞒了意图╮ 2020-11-27 14:00

In C++, the T q = dynamic_cast(p); construction performs a runtime cast of a pointer p to some other pointer type T that must

7条回答
  •  猫巷女王i
    2020-11-27 14:43

    it is usefull when we put the storage back to memory pool but we only keep a pointer to the base class. This case we should figure out the original address.

提交回复
热议问题