fix c++ type build error