note that I don’t know if that macro is actually going to work correctly, I don’t use them myself. You could write a shorter macro if you hardcoded the chain name and the types.
b) use a POD struct and create a branch for that with “splitting”:
I use b) myself, and it works for mixed types and array types. Reading the output tree becomes difficult however as you have to re-connect a new “invars” variable of the same type as the original.