Library Typedefs are fundamentally broken

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Sun Sep 21 12:26:45 PDT 2014


On 9/21/14, 12:05 PM, Dicebot wrote:
> On Sunday, 21 September 2014 at 18:09:00 UTC, Andrei Alexandrescu
> wrote:
>> On 9/21/14, 8:28 AM, Dicebot wrote:
>>> On Sunday, 21 September 2014 at 15:15:27 UTC, Andrei Alexandrescu wrote:
>>>> alias Int2 = Typedef!(int, "b.Int2");
>>>
>>> ...and don't forget to keep those updated when module / aggregate names
>>> change via refactoring!
>>
>> alias Int2 = Typedef!(int, __MODULE__ ~ ".Int2");
>
> Yeah now let's add __LINE__ there to make sure no clashes happen
> and suddenly we get the same solution as the one proposed but
> with manual typing of all special symbols.

No need. -- Andrei



More information about the Digitalmars-d mailing list