Can somebody explain the need for

```d
private template isSame(alias a, alias b)
{
    static if (!is(typeof(&a && &b)) // at least one is an rvalue
&& __traits(compiles, { enum isSame = a == b; })) // c-t comparable
    {
        enum isSame = a == b;
    }
    else
    {
        enum isSame = __traits(isSame, a, b);
    }
}
```

when there is already

```d
__traits(isSame, a, b)
```

?

Are there any cases where

```d
__traits(isSame, a, b)
```

doesn't have the same value as

```d
a == b
```

provided the static if expression above is true.

Reply via email to