alias c=mixin(expr); disallowed, why?

Timon Gehr timon.gehr at gmx.ch
Sun Jun 23 04:27:11 PDT 2013


On 06/23/2013 11:32 AM, Jacob Carlborg wrote:
> On 2013-06-22 23:47, Timon Gehr wrote:
>
>> No, it is arbitrary.
>
> I think the spec says you can only mixin whole expression.

That only means you cannot do things like eg:

mixin("a*"); mixin("b");

but instead you need to do:

mixin("a*b");

such that the string content forms a valid expression according to the 
grammar.


> But for some
> reason you can use a mixin in a __traits expression without having the
> whole expression in a mixin.
>

Example?


More information about the Digitalmars-d-learn mailing list