mixin alias

Derek Parnell derek at psych.ward
Sun Dec 16 07:45:12 PST 2007


Is there any reason why the alias template parameter cannot be a literal?


template Foo(alias b) {
   int X = b;
}

void main() {
  int y = 4;
  mixin Foo!(y);  // This is okay
  mixin Foo!(4);  // This fails to compile 
   // "mixin Foo!(4) does not match any template declaration"
}

       
-- 
Derek Parnell
Melbourne, Australia
skype: derek.j.parnell


More information about the Digitalmars-d-learn mailing list