cpp: start adding enumeration support in transformer