String mixin from within a template
data pulverizer
data.pulverizer at gmail.com
Sun Aug 23 22:10:19 UTC 2020
On Sunday, 23 August 2020 at 21:13:51 UTC, ag0aep6g wrote:
> On Sunday, 23 August 2020 at 20:54:22 UTC, data pulverizer
> wrote:
>> compiled string 1: alias x0 = Remove(indicies[i] - i, Args);
>> Error: found - when expecting )
>> Error: semicolon expected to close alias declaration
>> Error: no identifier for declarator i
>> Error: declaration expected, not ,
>> ... repeated for the other two cases ...
>
> As the compiler tells you, the line
>
> alias x0 = Remove(indicies[i] - i, Args);
>
> doesn't parse.
>
> You can't assign the result of a function call to an `alias`.
> If `Remove` is indeed a function, you need to use `enum`
> instead of `alias`.
> If `Remove` is a template, you're missing an exclamation mark.
>
> You also have a typo: "indicies" should be "indices".
Good spot on both accounts, I've also made other changes and its
finally working.
Many thanks!
More information about the Digitalmars-d-learn
mailing list