Is this a bug ?

Chang Long via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Jul 11 22:31:52 PDT 2016


On Tuesday, 12 July 2016 at 04:38:42 UTC, Chang Long wrote:
> test.d
> =========
> template newType(size_t N){
>         class NewType
>         {
>                 enum Type       = N ;
>         }
> }
>

just find it should be this:

template newType(size_t N){
         class NewType
         {
                 enum Type       = N ;
         }
         alias newType = NewType;
}



More information about the Digitalmars-d-learn mailing list