On 6/27/23 6:34 PM, Adam D Ruppe wrote:
On Tuesday, 27 June 2023 at 22:20:22 UTC, Chris Katko wrote:
pragma(msg, t.stringof); // does not see any new fields!
D's declarations are all order-independent, in theory those foreaches
are done simultaneously, so it is kinda a race condition.
On Tuesday, 27 June 2023 at 22:34:17 UTC, Adam D Ruppe wrote:
On Tuesday, 27 June 2023 at 22:20:22 UTC, Chris Katko wrote:
pragma(msg, t.stringof); // does not see any new fields!
D's declarations are all order-independent, in theory those
foreaches are done simultaneously, so
On Tuesday, 27 June 2023 at 22:20:22 UTC, Chris Katko wrote:
pragma(msg, t.stringof); // does not see any new fields!
D's declarations are all order-independent, in theory those
foreaches are done simultaneously, so it is kinda a race
condition.
In practice, the compiler doe
Does anyone know why the new variables don't show up after the
static foreach?
I have a struct, it has some marked fields. I want to note those
fields at compile time and make some similarly named fields like
myField becomes myField__replicated.
The code doesn't _have_ to be inside the struc
On Tuesday, 27 June 2023 at 05:03:01 UTC, Jonathan M Davis wrote:
However, I would point out that getSymbolsByUDA gives you
symbols, not strings, whereas pragma(msg, ...) wants a string.
For some time now, it accepts any number of objects, which will
all be converted to strings and concatenate
On Tuesday, 27 June 2023 at 04:25:13 UTC, Chris Katko wrote:
How do I get just the field name?
__traits(identifier, field)
And why does it think this is a run-time value?
It is the same as if you wrote `Class.field`