As Joachim Pileborg put it,
No, C++ doesn't have introspection so there is no way to get structure members of unknown structures.
So what I ended up doing was overloading +
for each struct individually. This in turn allowed me to create a generic function that takes a node, and sums all of its parent structs (useful, for example, for summing positions, to get the absolute position of an object).