<div>Steven,</div><div><br></div>I see,  but here's IsStaticArray from traits.d<br><br><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><font class="Apple-style-span" face="'courier new', monospace"><div>
template isStaticArray(T : U[N], U, size_t N)</div><div>{</div><div>    enum bool isStaticArray = true;</div><div>}</div><div><br></div><div>template isStaticArray(T)</div><div>{</div><div>    enum bool isStaticArray = false;</div>
<div>}</div><div><br></div></font></div></blockquote><div>It looks like the first version is using the "[]" format. It is different in that it has the [N] and then goes on to specify that N is a size_t. </div><div>
<br></div><div>John</div><div><br></div><div class="gmail_quote">On Mon, Oct 31, 2011 at 5:13 AM, Steven Schveighoffer <span dir="ltr"><<a href="mailto:schveiguy@yahoo.com">schveiguy@yahoo.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">On Sat, 29 Oct 2011 12:11:42 -0400, J Arrizza <<a href="mailto:cppgent0@gmail.com" target="_blank">cppgent0@gmail.com</a>> wrote:<br>

<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
Thanks for the reply Jonathan, but it didn't work for me:<br>
<br></div>
void abc(T) (T[] parm1)<div class="im"><br>
if (isDynamicArray!T)<br>
{<br>
  writeln("array : ", parm1);<br>
}<br>
<br>
<br>
Nor did:<br>
<br></div>
void abc(T) (T[] parm1)<div class="im"><br>
if (isStaticArray!T)<br>
{<br>
  writeln("array : ", parm1);<br>
}<br>
<br>
<br>
Output is the same:<br>
<br></div><div class="im">
simpleparm: 1<br>
simpleparm: str<br>
simpleparm: [1, 2]<br>
</div></blockquote>
<br>
I know you've since figured it out, but I thought I'd point out why this didn't work.<br>
<br>
The reason it doesn't match is because your parameters are arrays of type T, but you are only instantiating if T *itself* is an array.  So for example, int[][] would work, because T is matched as int[], giving int[][] as the parm1 type.<br>

<br>
-Steve<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>John<br>blog: <a href="http://arrizza.blogspot.com/">http://arrizza.blogspot.com/</a><br>web: <a href="http://www.arrizza.com/">http://www.arrizza.com/</a><br>