Comment #0 by stanislav.blinov — 2018-11-18T10:42:22Z
void main() {
struct S {
~this() {}
}
foreach (name; __traits(allMembers, S))
static assert(__traits(hasMember, S, name));
}
The above will assert: __traits(allMembers) reports that S has a member "this" (the context pointer), but __traits(hasMember) insists that it doesn't.
Perhaps "this" could be renamed to "__context", and made visible to __traits(hasMember)?
Comment #1 by boris2.9 — 2021-04-17T23:19:31Z
*** This issue has been marked as a duplicate of issue 14740 ***