string mixin only works once per block?

Chris wendlec at tcd.ie
Fri Apr 11 08:13:49 PDT 2014


On Friday, 11 April 2014 at 14:37:32 UTC, Dicebot wrote:
> On Friday, 11 April 2014 at 14:31:47 UTC, Chris wrote:
>> Just of the top of my head, have you tried
>>
>> mixin template Link {
>>  const string link() {
>>  // ...
>>  }
>> }
>>
>> or something like this?
>
> You can't use template mixins as statements, those are only for 
> declarations.

Ah yes, I see. Was only off the top of my head.


More information about the Digitalmars-d-learn mailing list