C++ compiler fix for correct expression conversion error handling