On Wednesday, 22 March 2017 at 20:53:17 UTC, crimaniak wrote:
On Wednesday, 22 March 2017 at 20:35:27 UTC, StarGrazer wrote:I've tried compiles but I guess that only checks if the code has valid syntax, not if it actually will compile in context.https://dlang.org/spec/traits.html#hasMember
I tried that but D complains static if (hasMember!(S, "x")) return; else s.x = 3; D says that x doesn't exist.