array depth template
Jarrett Billingsley
jarrett.billingsley at gmail.com
Thu Jun 11 20:12:56 PDT 2009
On Thu, Jun 11, 2009 at 11:02 PM, Saaa<empty at needmail.com> wrote:
> Any advantage to using two?
I just tend to prefer template specialization when doing type pattern
matching. It works out better than is() in some cases.
> He also does : is( T B ==B[]) iso is( T B:B[] )
> Any significant difference there?
I'm.. not sure, in this case anyway. Normally == does strict type
comparison while : does implicit type conversion, but in this case,
is() is being (ab)used to pick apart a type rather than test one. I
think it'll always return 'true' in either case if T is an array, so I
don't think there's a functional difference.
> Also, what's the advantage of explicitly defining it as a template?
As opposed to what, implicitly defining it as a template? This
question doesn't really make sense.
More information about the Digitalmars-d-learn
mailing list