Tobias,<br><br>Thanks for your corrections. It is a bit difficult to speak by means of &quot;C++-Standard Language&quot; ;)<br><br><br>With Kind Regards,<br>Ovanes<br><br>P.S. <br>---- OFFTOPIC<br>Could you take a look at my previous posting regarding singleton destruction. May be you have overseen it.
<br>---- END<br><br><br><div class="gmail_quote">On Jan 24, 2008 3:26 PM, Tobias Schwinger &lt;<a href="mailto:tschwinger@isonews2.com">tschwinger@isonews2.com</a>&gt; wrote:<br>&nbsp; [...]<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
The wording is a bit ambiguous: A pointer to an /incomplete type/ is in<br>fact OK (using standard terminology), but &#39;TreeImplBase&#39; is a /template<br>id/ which is not a type at all.<br><br>As Ovanes pointed out that construct is illegal, however (except inside
<br>a definition of &#39;TreeImplBase&#39; where it&#39;s the /injected class name/).<br><br>/Specializing/ a template with template arguments yields a type. Using<br>(whatever) member of this type&#39;s interface causes the template to be
<br>implicitly (possibly partially) /instantiated/. It&#39;s most important to<br>realize that specializing a template does not cause the template to be<br>instantiated automatically.<br><br>Note that &quot;template specialization&quot; has a context-dependent meaning, as
<br>it can either refer to a type or of a class (template) definition of a<br>variant implementation of the template:<br><br> &nbsp; &nbsp; // /primary template/<br> &nbsp; &nbsp; template&lt; typename T &gt; struct A { ... };<br><br> &nbsp; &nbsp; // definition of the (full) specialization A&lt;int&gt;
<br> &nbsp; &nbsp; template&lt; &gt; struct A&lt;int&gt; { ... };<br><br> &nbsp; &nbsp; // definition of a partial specialization<br> &nbsp; &nbsp; template&lt; typename T &gt; struct A&lt; B&lt;T&gt; &gt;<br> &nbsp; &nbsp; {<br> &nbsp; &nbsp; &nbsp; &nbsp; typedef A self; // /injected class name/ is a type
<br> &nbsp; &nbsp; };<br><br> &nbsp; &nbsp; // X and Y are specializations (not instantiations)!<br> &nbsp; &nbsp; typedef A&lt; B&lt;int&gt; &gt; X;<br> &nbsp; &nbsp; typedef A&lt; long &gt; Y;<br><br> &nbsp; &nbsp; int main()<br> &nbsp; &nbsp; {<br> &nbsp; &nbsp; &nbsp; &nbsp;X x; // instantiation of the &#39;B&lt;int&gt;&#39;-specialization of A
<br> &nbsp; &nbsp; &nbsp; &nbsp;// at this point<br><br> &nbsp; &nbsp; // ...<br><br>OK, that&#39;s about template terminology in five minutes :-).<br><br><br>Regards,<br><font color="#888888">Tobias<br></font><div><div></div><div class="Wj3C7c"><br>_______________________________________________
<br>Boost-users mailing list<br><a href="mailto:Boost-users@lists.boost.org">Boost-users@lists.boost.org</a><br><a href="http://lists.boost.org/mailman/listinfo.cgi/boost-users" target="_blank">http://lists.boost.org/mailman/listinfo.cgi/boost-users
</a><br></div></div></blockquote></div><br>