struct Foo {};
...
void * p = (Foo*)0; // OK
void ** pp = (Foo**)0; // Invalid conversion
As far as I recall, a pointer to any non-pointer type can be implicitly cast to void*
in C++. Why then is the same not allowed for casting a ponter to pointer type to void**
?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…