<div dir="ltr"><div>Because it is definitely unsafe.</div><div><br></div><div>void main()</div><div>{</div><div>    int n;</div><div>    int* pn = &n;</div><div>    int** ppn = &pn;</div><div><br></div><div>    void** ppv = ppn;   // if this is allowed...?</div>
<div><br></div><div>    double x;</div><div>    double* px = &x;</div><div><br></div><div>    // double* is implicitly convertible to void*</div><div>    *ppv = px;</div><div><br></div><div>    // Wow, now int** points the double* data!</div>
<div>    assert(*ppn is cast(void*)px);</div><div>}</div><div><br></div><div>Kenji Hara</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014/1/22 Katayama Hirofumi MZ <span dir="ltr"><<a href="mailto:katayama.hirofumi.mz@gmail.com" target="_blank">katayama.hirofumi.mz@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello, this is a Japanese programmer, katahiromz.<br>
<br>
If TYPE1 was compatible to TYPE2, I think TYPE1* should be compatible to TYPE2*.<br>
<br>
Why isn't int** type compatible to void** type?<br>
<br>
What's your idea? Thanks.<br>
</blockquote></div><br></div>