fix cpp test compile bug introduced in last commit