Why not mixin "int a;" ??
Tomasz Sowiñski
tomeksowi at gmail.com
Sun Aug 24 17:41:35 PDT 2008
BCS Wrote:
> template Foo()
> {
> static const char[] Foo = "int a;"
> }
>
> mixin Foo;
>
> did that add a var named a or a const named Foo?
>
a const named Foo
something like "mixin Foo!().Foo;" should add a var named a, no?
btw, I tried "mixin(Foo);" and it doesn't compile:
Error: argument to mixin must be a string, not (Foo())
so there wouldn't be any ambiguity anyway
Tomek
More information about the Digitalmars-d-learn
mailing list