bearophile wrote: > (I am looking for rough corners in D, or in my knowledge of D.) > > In this page: > http://www.digitalmars.com/d/2.0/templates-revisited.html > > In the section "Template Parameters" there is written: > > P:P*, // P must be a pointer type > > ----------------- > > So I have written this D2 program: > > > template IsPointer1(T) { > enum bool IsPointer1 = is(T : T*); > } > void main() { > int* ptr; > static assert(IsPointer1!(typeof(ptr))); // Err > } > > > But it asserts, do you know why?
You do realise that "Template Parameters" are a completely different thing to "is expressions", right?