Fix C++ type inference.