Types to introspect.
import lu.uda : Hidden, Unserialisable; struct Foo { string veryLongName; char[][string] css; @Unserialisable string[][string] veryVeryVeryLongNameThatIsInvalid; @Hidden float likewiseWayLongerButInvalid; deprecated bool alsoVeryLongButDeprecated; void aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(); void bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb(T)(); string foo(string,string,string,string,string,string,string,string); } struct Bar { string evenLongerName; float f; @Unserialisable short shoooooooooooooooort; @Unserialisable @Hidden long looooooooooooooooooooooong; } alias fooNames = longestUnserialisableMemberNames!Foo; static assert((fooNames.member == "veryVeryVeryLongNameThatIsInvalid"), fooNames.member); static assert((fooNames.type == "string[][string]"), fooNames.type); alias barNames = longestUnserialisableMemberNames!Bar; static assert((barNames.member == "shoooooooooooooooort"), barNames.member); static assert((barNames.type == "string"), barNames.type); alias bothNames = longestUnserialisableMemberNames!(Foo, Bar); static assert((bothNames.member == "veryVeryVeryLongNameThatIsInvalid"), bothNames.member); static assert((bothNames.type == "string[][string]"), bothNames.type);
Introspects one or more aggregate types and determines the name of the longest member found between them, as well as the name of the longest type. Includes Unserialisable members.
This is used for formatting terminal output of configuration files, so that columns line up.