An idea to improve eponymous templates

Daniel Murphy yebblies at nospamgmail.com
Thu Apr 12 02:21:16 PDT 2012


"kenji hara" <k.hara.pg at gmail.com> wrote in message 
news:mailman.1646.1334209001.4860.digitalmars-d at puremagic.com...
> It conflicts with ”alias this” syntax.
>
> template Inherits(T)
> {
>  T value;
>  alias T Inherits;   // (1) Inherits!int == int
>  alias T this;   // (2) declares "alias this"!
> }
> struct S {
>  mixin Inherits!int;  // (1) invalid or (2) mixing alias this declaration?
> }
>
> Kenji Hara
>

Doesn't it need to be explicitly marked as a 'mixin template' for it to be 
mixed in? 




More information about the Digitalmars-d mailing list