Is this a good way to get the depth of an array?
int getArrayDepth(T)(ref T array)
{
static if( is(T A:A[]) )
{
A arr;
return 1 + getArrayDepth(arr);
}
else
{
return 0;
}
return -1;
} - array depth template Saaa
- Re: array depth template BCS
- Re: array depth template Jarrett Billingsley
- Re: array depth template Saaa
- Re: array depth template Saaa
- Re: array depth template Jarrett Billingsley
- Re: array depth template Saaa
- Re: array depth template Jarrett Billingsley
- Re: array depth template Saaa
- Re: array depth template Saaa
