xxxxxxxxxx
import std;
struct Stuff
{
int thing1;
int thing2;
}
void main()
{
void doStuff (ref Stuff data)
{
int*[] things;
static foreach (I, Pct; FieldNameTuple!Stuff)
{
// Deprecated:
things ~= &mixin(`data.` ~ Pct);
// Compiles without deprecations:
things[I] = &mixin(`data.` ~ Pct);
}
}
}