> Not always. Consider what would happen if sizeof(short*) != sizeof(void*),
or if the two don't share the same internal representation (both are
possible).
--
Clark S. Cox, III
cl*******@gmail.com
I'll try to collect all responses here:
Consider what would happen if sizeof(short*) != sizeof(void*)
Well that would make life very complicated. Does that actually happen
(except the near/far pointers)? (this also address Ron's response)
Robert pointed to this faq:
http://www.parashift.com/c++-faq-lit....html#faq-21.2
I disagree (not with the FAQ), but the analogy does not apply here. When
converting
to void* pointer one explicitly casts it to (for lack of better word)
"void". Meaning
that if one is going to dereference it he/she will have to infer the type by
some
other means.
So, yes "Derived** ? Base** " is an error, but "something** -> void**"
still seems to make sense, since void** is not "is-a" relationship but just
a pointer
to a pointer to a memory location... or am I missing some improant step?
Thanks,
Igor