Getting FieldNameTuple including all base-classes.
realhet
real_het at hotmail.com
Tue May 19 23:15:45 UTC 2020
Hi,
I was able to reach all the fields in a subclass using foreach
and BaseClassesTuple, but is there a way to do this using
functional programming primitives, but in compile time for tuples?
private template FieldNameTuple2(T) {
enum FieldNameTuple2 = BaseClassesTuple!T.map!(S =>
FieldNameTuple!S).join;
}
This is obviously wrong, but is there a way to do it?
I've searched for FieldNameTuple and BaseClassesTuple, but
without luck. It's weird because it seems like a common thing to
do.
Thanks in advance!
More information about the Digitalmars-d-learn
mailing list