Re: RFC: Fixing std.typecons.Typedef

2016-09-05 Thread Chris Wright via Digitalmars-d
On Sat, 03 Sep 2016 11:34:02 +, Lodovico Giaretta wrote: > I see the current behaviour not as a bug, but as a not-well-documented > feature. It's the default behavior, though, and it does nearly the opposite of what you probably want.

Re: RFC: Fixing std.typecons.Typedef

2016-09-03 Thread Lodovico Giaretta via Digitalmars-d
On Friday, 2 September 2016 at 19:40:52 UTC, Meta wrote: I was thinking about how to fix Typedef the other day and came up with a way of generating a guaranteed unique ID for each instantiation, even if they are on the same line: [...] What I'd like to know is if there might be a better way

Re: RFC: Fixing std.typecons.Typedef

2016-09-02 Thread Meta via Digitalmars-d
On Friday, 2 September 2016 at 19:40:52 UTC, Meta wrote: I was thinking about how to fix Typedef the other day and came up with a way of generating a guaranteed unique ID for each instantiation, even if they are on the same line: alias FixedTypedef(T, T init = T.init, string cookie = new

RFC: Fixing std.typecons.Typedef

2016-09-02 Thread Meta via Digitalmars-d
I was thinking about how to fix Typedef the other day and came up with a way of generating a guaranteed unique ID for each instantiation, even if they are on the same line: alias FixedTypedef(T, T init = T.init, string cookie = new class {}.stringof) = Typedef(T, init, cookie); alias Test1