mixin alias
0ffh
frank at frankhirsch.youknow.what.todo.net
Sun Dec 16 08:00:19 PST 2007
Derek Parnell wrote:
> Is there any reason why the alias template parameter cannot be a literal?
>
>
> template Foo(alias b) {
> int X = b;
What happens when "b=3;"?
> }
>
> 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"
> }
>
>
regards, frank
More information about the Digitalmars-d-learn
mailing list