Library Typedefs are fundamentally broken (alternate implementation)

bearophile via Digitalmars-d digitalmars-d at puremagic.com
Tue Sep 23 08:05:28 PDT 2014


Andrej Mitrovic:

> alias Same_Type_1 = Typedef!(void*, null, "cookie");
> alias Same_Type_2 = Typedef!(void*, null, "cookie");
> static assert(is(Same_Type_1 == Same_Type_2));   // unsafe 
> *only if you request it*

I suggest to not offer this usage possibility.

Bye,
bearophile


More information about the Digitalmars-d mailing list