Library Typedefs are fundamentally broken

Dicebot via Digitalmars-d digitalmars-d at puremagic.com
Wed Sep 17 10:40:25 PDT 2014


On Wednesday, 17 September 2014 at 17:16:55 UTC, Walter Bright 
wrote:
> Even worse? How? (Yes, I know that if you instantiate it twice 
> on the same line, you'll get the same value.)

To address the latter I usually implement it as a string token 
that defaults to __MODULE__ ~ ":" ~ to!string(__LINE__) but still 
can be manually specified by the user. It makes it possible to 
disambiguate single line definitions when necessary.


More information about the Digitalmars-d mailing list