Dealing with type information loss in Parameters Fields and Return type

Nicholas Wilson via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Apr 17 05:07:45 PDT 2016


On Sunday, 17 April 2016 at 11:47:52 UTC, Jonathan M Davis wrote:
> On Sunday, April 17, 2016 11:00:15 Nicholas Wilson via 
> Digitalmars-d-learn wrote:
>> On Sunday, 17 April 2016 at 10:48:08 UTC, Jonathan M Davis 
>> wrote:
>> > [...]
>>
>> Sorry for the confusion, I didn't. getting the string "size_t" 
>> as the result of a hypothetical StringReturnType is the 
>> desired outcome.
>
> Then I very much doubt that it's possible. The compiler doesn't 
> distinguish between an alias and the original. As far as it's 
> concerned, they're exactly the same thing. The compiler is 
> pretty much doing the equivalent of textually replacing all 
> instances of an alias with the original.
>
> - Jonathan M Davis

Then time for some compiler hacking!!


More information about the Digitalmars-d-learn mailing list