protoMemberOf

Returns a tagged member name corresponding to a given tag.

string
protoMemberOf
(
T
)
(
int tag
)

Examples

1 struct Test
2 {
3   @ProtoTag(2)
4   int i;
5   @ZigZag
6   @ProtoTag(1)
7   int j;
8 }
9 
10 static assert(protoTagOf!(Test, "i") == 2);
11 static assert(!isZigZag!(Test, "i"));
12 static assert(protoMemberOf!Test(2) == "i");
13 static assert(isZigZag!(Test, "j"));

Meta