On 9/11/07, <b class="gmail_sendername">Derek Parnell</b> &lt;<a href="mailto:derek@nomail.afraid.org">derek@nomail.afraid.org</a>&gt; wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
In other words, if I have a struct with three members, each of a different<br>type, I need to code ...<br><br>struct S3(T, U, V)<br>{<br>&nbsp;&nbsp; T member1;<br>&nbsp;&nbsp; U member2;<br>&nbsp;&nbsp; V member3;<br>}<br><br>S3!(const(int), const(float), const(bool));
<br><br>and so on for 4, 5, 6, .... 23 member structs.<br><br>I&#39;m sure I&#39;m misunderstanding you, because this is really silly.<br></blockquote></div><br>I don&#39;t think you&#39;re misunderstanding. I think that&#39;s what Walter is saying.
<br><br>But here&#39;s another idea. If it were allowable that<br>(1) an alias template parameter could accept a type constructor, and<br>(2) &quot;auto&quot; were accepted as a do-nothing type constructor<br>then you would be able to do this:
<br><br>&nbsp;struct S(alias X)<br>&nbsp;{<br>&nbsp;&nbsp;&nbsp;&nbsp; X(int)* pi;<br>&nbsp;&nbsp;&nbsp;&nbsp; X(float)* pf;<br>&nbsp;&nbsp;&nbsp;&nbsp; X(double)* pd;<br>&nbsp;};<br>&nbsp;<br>&nbsp;S(const) k; // k&#39;s members are tail-const<br>&nbsp;S(auto) m; // m&#39;s members are mutable<br><br><br><br>