Library Typedefs are fundamentally broken
Andrei Alexandrescu via Digitalmars-d
digitalmars-d at puremagic.com
Tue Sep 16 20:05:05 PDT 2014
On 9/16/14, 7:57 PM, Freddy wrote:
> When you have separate 2 typedefs of the exact same type, they
> are equal.While this maybe able to be solved with
> Typedef!(Typedef!(...)) different modules typedef ing the same
> type (most likely build-in types) would have their typedef be
> equivalent thereby degrading the purpose of typedef.
> ---
> import std.typecons;
>
> alias meter = Typedef!float;
> alias feet = Typedef!float;
> static assert(!is(meter==feet));
> ---
> Your thoughts?
Add a sequence number as a uint, defaulted to 0. -- Andrei
More information about the Digitalmars-d
mailing list