An idea to improve eponymous templates

kenji hara k.hara.pg at gmail.com
Thu Apr 12 02:30:16 PDT 2012


No. Current implementation doesn't enforce it.

Kenji Hara

2012年4月12日18:21 Daniel Murphy <yebblies at nospamgmail.com>:
> "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