Little demo of allowing basic types to implement interfaces.

Dicebot public at
Wed Sep 4 02:33:33 PDT 2013

On Wednesday, 4 September 2013 at 09:23:44 UTC, Rory McGuire 
> thanks, yes, I just found that in TDPL. knew it was templates 
> but forgot
> about template mixins.
> Do you know how to get a default parameter like __MODULE__ or 
> __LINE__ to
> be used from the calling site?
> I've tried but I think my DMD is broken because it doesn't even 
> work when I
> subclass Exception().

Special tokens like __LINE__ in default parameters are evaluated 
at the call site:

It does not help though, because you don't need __MODULE__ of the 
call site, you need list of modules it has imported in exact call 

More information about the Digitalmars-d-announce mailing list