<div>hi there, please read this code:</div><div><br></div><div>import std.stdio;</div><div><br></div><div>struct test(T)</div><div>{</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>alias typeof(*this) type;</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>T a;</div><div>}</div><div><br></div><div><br></div><div>void main()</div><div>{</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>test!(int).type t;</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>t.a = 123;</div><div><span class="Apple-tab-span" style="white-space:pre">        </span></div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>writeln(t.a);</div><div>}</div><div><br></div><div>I guessed it would work. but the compiler said:</div><div><br></div><div><div>main.d(7): Error: can only * a pointer, not a 'test!(int)'</div>
<div>main.d(14): Error: template instance main.test!(int) error instantiating</div></div><div><br></div><div>what is the problem?</div><br>