Incorrect ParameterIdentifierTuple results?

John Chapman johnch_atms at hotmail.com
Fri Nov 30 18:18:36 UTC 2018


ParameterIdentifierTuple produces different results depending on 
whether unnamed parameters are built-in types or user types.

struct SomeType {
   void wrong(SomeType) {}
   void right(int) {}
}

ParameterIdentifierTuple!(__traits(getMember, SomeType, 
"wrong")); // tuple("SomeType")
ParameterIdentifierTuple!(__traits(getMember, SomeType, 
"right")); // tuple("")

Is this the intended behaviour? Shouldn't it just return empty 
strings in both cases? What would be the benefit of returning 
user type names?


More information about the Digitalmars-d mailing list