On Wednesday, 1 September 2021 at 23:04:18 UTC, Per Nordlöw wrote:
On Wednesday, 1 September 2021 at 22:51:40 UTC, Per Nordlöw
wrote:
Can somebody explain the need for
Ok, `__traits(isSame)` always returns false for values.
This is very unfortunate as `std.traits.isSame` is one of the
most
On Wednesday, 1 September 2021 at 22:51:40 UTC, Per Nordlöw wrote:
Can somebody explain the need for
```d
private template isSame(alias a, alias b)
{
static if (!is(typeof( && )) // at least one is an
rvalue
&& __traits(compiles, { enum isSame = a == b; }))
// c-t comparable
On Wednesday, 1 September 2021 at 22:51:40 UTC, Per Nordlöw wrote:
Can somebody explain the need for
Ok, `__traits(isSame)` always returns false for values.
This is very unfortunate as `std.traits.isSame` is one of the
most used template instances in typical std.meta-programming and
has a
Can somebody explain the need for
```d
private template isSame(alias a, alias b)
{
static if (!is(typeof( && )) // at least one is an rvalue
&& __traits(compiles, { enum isSame = a == b; })) //
c-t comparable
{
enum isSame = a == b;
}
else
{
enum