Oh, here's a fun one: import std.stdio; static foreach (member; __traits(allMembers, std)) { static assert(__traits(hasMember, std, member)); } You'd think that __traits(allMembers) would imply __traits(hasMember). That would be a dangerous mistake.