On Friday, 27 December 2019 at 18:51:31 UTC, Adam D. Ruppe wrote:
On Friday, 27 December 2019 at 18:49:32 UTC, Sjoerd Nijboer wrote:
Should concatenating the list and mixing that in work too?

yeah that'd work too. As long as all the overloads are coming from the same source, D allows it.

but if you add something manually in the struct then you have two sources again so this rule can bite back.

It's a completely generated body of a struct, so that won't be an issue. It was just convenient to have a static foreach loop and generate some functions out of that by invoking a mixin template, which will cause the scoping problem.

I'll probably generate the `string[]` using a function, join it and then mixin the result to have it all in one scope.

I thought I had a valid usecase for mixin templates. :/
They're quite daunting beasts with these kind of constraints.

Reply via email to