我刚看过这个回答How are virtual functions and vtable implemented?。答复的作者使用以下表达式:这是什么意思std :: swap(*(void **)x,*(void **)y)?
std::swap(*(void **)x, *(void **)y);
// Now x is a C, and y is a B! Hope they used the same layout of members!
有人可以解释它是如何工作的?为什么和什么意思(void **)
其次是operator*
?
这并不好。 [这个问题](http://stackoverflow.com/questions/9040818/how-to-use-void-pointer-correctly)可能会帮助你。 – erip