Checks for presence of method/field with specified name in aggregate.
In D1 most common idiom is to simply check for is(typeof(T.something)) but
in D2 it can backfire because of UFCS as global names are checked too - thus
built-in __traits(hasMember) is used instead, which was not available in
D1.
Checks for presence of method/field with specified name in aggregate.
In D1 most common idiom is to simply check for is(typeof(T.something)) but in D2 it can backfire because of UFCS as global names are checked too - thus built-in __traits(hasMember) is used instead, which was not available in D1.