c++: Fix convert_like in template [PR91465, PR93870, PR92031, PR94068]