isValidBinaryOp doesn't compile

Andrej Mitrovic andrej.mitrovich at gmail.com
Sat Sep 14 14:17:39 PDT 2013


On 9/14/13, "Nordlöw" <per.nordlow at gmail.com> wrote:
> In the post
>
> http://forum.dlang.org/thread/bug-6384-3@http.d.puremagic.com/issues/
>
> I tried to compile
>
> template isValidBinaryOp(T1, string op, T2) {
>     alias isValidBinaryOp = is(mixin("T1.init" ~ op ~ "T2.init") :
> bool);
> }
>
> What is wrong?

Use "enum isValidBinaryOp = is..".

Aliases are used to create symbols which refer to other symbols but
not to values.


More information about the Digitalmars-d mailing list