Is this a bug ?

Chang Long via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Jul 11 21:38:42 PDT 2016


test.d
=========
template newType(size_t N){
         class NewType
         {
                 enum Type       = N ;
         }
}

class A{}

alias Type      = newType!1 ;

N New(N)(){
         return new N();
}

void main(){
         auto a = New!A;
         auto n = New!Type;
}
============


test.d(19): Error: template instance New!(__T7newTypeVmi1Z) does 
not match template declaration New(N)()


More information about the Digitalmars-d-learn mailing list