Union work with cpp.ref in cpp
Union work with cpp.ref in cpp

Summary: This is similar to D1782804 but in cpp.

Test Plan:
generate code for union with a cpp.ref field succeeds.
Example generated code: https://phabricator.fb.com/P19698506

Reviewed By: davejwatson@fb.com

Subscribers: trunkagent, alandau, mshneer

FB internal diff: D1786129

Tasks: 5125192

Signature: t1:1786129:1421777183:be3cab9ad6928e56518c6f5bb9cdd7cae38ebb68

soumith/fbthrift,SergeyMakarenko/fbthrift,facebook/fbthrift,maxwell-demon/fbthrift,fengshao0907/fbthrift,raphaelamorim/fbthrift,Orvid/fbthrift,guker/fbthrift,SergeyMakarenko/fbthrift,soumith/fbthrift,sinjar666/fbthrift,fengshao0907/fbthrift,LinusU/fbthrift,SergeyMakarenko/fbthrift,maxwell-demon/fbthrift,guker/fbthrift,Orvid/fbthrift,raphaelamorim/fbthrift,raphaelamorim/fbthrift,guker/fbthrift,getyourguide/fbthrift,uber/fbthrift,raphaelamorim/fbthrift,kangkot/fbthrift,SergeyMakarenko/fbthrift,raphaelamorim/fbthrift,uber/fbthrift,maxwell-demon/fbthrift,soumith/fbthrift,LinusU/fbthrift,fengshao0907/fbthrift,getyourguide/fbthrift,LinusU/fbthrift,project-zerus/fbthrift,project-zerus/fbthrift,SergeyMakarenko/fbthrift,Orvid/fbthrift,facebook/fbthrift,uber/fbthrift,guker/fbthrift,sinjar666/fbthrift,project-zerus/fbthrift,SergeyMakarenko/fbthrift,soumith/fbthrift,chjp2046/fbthrift,fengshao0907/fbthrift,chjp2046/fbthrift,facebook/fbthrift,kangkot/fbthrift,chjp2046/fbthrift,facebook/fbthrift,chjp2046/fbthrift,getyourguide/fbthrift,chjp2046/fbthrift,facebook/fbthrift,project-zerus/fbthrift,soumith/fbthrift,maxwell-demon/fbthrift,fengshao0907/fbthrift,chjp2046/fbthrift,kangkot/fbthrift,maxwell-demon/fbthrift,LinusU/fbthrift,sinjar666/fbthrift,uber/fbthrift,sinjar666/fbthrift,Orvid/fbthrift,uber/fbthrift,HankFaan/fbthrift,kangkot/fbthrift,project-zerus/fbthrift,guker/fbthrift,soumith/fbthrift,getyourguide/fbthrift,maxwell-demon/fbthrift,getyourguide/fbthrift,project-zerus/fbthrift,fengshao0907/fbthrift,raphaelamorim/fbthrift,fengshao0907/fbthrift,SergeyMakarenko/fbthrift,uber/fbthrift,chjp2046/fbthrift,LinusU/fbthrift,uber/fbthrift,raphaelamorim/fbthrift,sinjar666/fbthrift,chjp2046/fbthrift,HankFaan/fbthrift,getyourguide/fbthrift,getyourguide/fbthrift,guker/fbthrift,getyourguide/fbthrift,LinusU/fbthrift,Orvid/fbthrift,guker/fbthrift,uber/fbthrift,kangkot/fbthrift,Orvid/fbthrift,sinjar666/fbthrift,sinjar666/fbthrift,Orvid/fbthrift,LinusU/fbthrift,chjp2046/fbthrift,chjp2046/fbthrift,project-zerus/fbthrift,project-zerus/fbthrift,project-zerus/fbthrift,getyourguide/fbthrift,chjp2046/fbthrift,getyourguide/fbthrift,facebook/fbthrift,HankFaan/fbthrift,LinusU/fbthrift,guker/fbthrift,fengshao0907/fbthrift,maxwell-demon/fbthrift,maxwell-demon/fbthrift,soumith/fbthrift,HankFaan/fbthrift,getyourguide/fbthrift,LinusU/fbthrift,kangkot/fbthrift,raphaelamorim/fbthrift,fengshao0907/fbthrift,sinjar666/fbthrift,HankFaan/fbthrift,fengshao0907/fbthrift,maxwell-demon/fbthrift,LinusU/fbthrift,kangkot/fbthrift,guker/fbthrift,SergeyMakarenko/fbthrift,HankFaan/fbthrift,sinjar666/fbthrift,maxwell-demon/fbthrift,fengshao0907/fbthrift,chjp2046/fbthrift,getyourguide/fbthrift,HankFaan/fbthrift,kangkot/fbthrift,guker/fbthrift,kangkot/fbthrift,LinusU/fbthrift,HankFaan/fbthrift,project-zerus/fbthrift,Orvid/fbthrift,project-zerus/fbthrift,uber/fbthrift,kangkot/fbthrift,project-zerus/fbthrift,soumith/fbthrift,soumith/fbthrift,raphaelamorim/fbthrift,HankFaan/fbthrift,SergeyMakarenko/fbthrift,SergeyMakarenko/fbthrift,facebook/fbthrift,soumith/fbthrift,SergeyMakarenko/fbthrift,sinjar666/fbthrift,guker/fbthrift,Orvid/fbthrift,Orvid/fbthrift,uber/fbthrift,SergeyMakarenko/fbthrift,raphaelamorim/fbthrift,uber/fbthrift,HankFaan/fbthrift,soumith/fbthrift,maxwell-demon/fbthrift,facebook/fbthrift,facebook/fbthrift,Orvid/fbthrift,kangkot/fbthrift,sinjar666/fbthrift,HankFaan/fbthrift,uber/fbthrift,raphaelamorim/fbthrift