It's worth noting this is for a shader resources declaration system that would be shared between the host and HLSL, so I don't exactly have options other than this or preprocessing shaders externally which I wouldn't want to do. I picked the simple usecase in the original post for simplicity, this is the actual usecase in HLSL:
#define BEGIN_BINDING_TABLE(name, slot)
#define END_BINDING_TABLE()
#define RESOURCE(slot, idx, descType, type, name) \
type name : register( GET_REG_##descType(idx), space##slot );
Where I want to eliminate the need for entering the slot per resource, since the whole table is functionally supposed to be a single slot, and instead have BEGIN_BINDING_TABLE be a sort of macro with variadic args