This creates a closure over i:
---
void f() {
int i;
struct N {
void makeNested() {++i;}
}
// maybe do something with N
}
---
Would be neat if it didn't.
For example, std.string.sformat suffers from this.
Comment #1 by robert.schadek — 2024-12-13T18:03:48Z