Static foreach bug?
bauss
jj_1337 at live.dk
Mon Sep 3 06:41:37 UTC 2018
On Monday, 3 September 2018 at 06:39:17 UTC, Neia Neutuladh wrote:
> On Monday, 3 September 2018 at 04:43:30 UTC, bauss wrote:
>> On Sunday, 2 September 2018 at 20:01:08 UTC, Neia Neutuladh
>> wrote:
>>> On Sunday, 2 September 2018 at 19:42:20 UTC, bauss wrote:
>>>> Woud be so much more maintainable if I could have each
>>>> statement into a variable that could be maintained properly.
>>>
>>> You could extract the body of the static foreach into a
>>> [template] function.
>>
>> I'm aware of that, but it's an unnecessary work around for
>> something as trivial as the alternative would have been.
>
> You would need to mark symbols as scoped to the static foreach
> body, or else as exported from a scope to an outer scope. So
> it's not exactly trivial.
It's more trivial than having them in another part of the code.
I changed my implementation though to move away from static
foreach for now and just generate a huge mixin from the
definitions of the generated interface.
More information about the Digitalmars-d
mailing list