I am encountering a weird issue in visual studio 2022 (version 17.7.1). In the following program:
#include <iostream>
#include <sstream>
using namespace std;
int main()
{
istringstream istr("1e-07 3");
double xx = 0;
int yy = 0;
istr >> xx >> yy;
cout << "xx = " << xx << endl;
return 0;
}
The program will print differently based on runtime library and platform toolset:
Toolset v143, Multi-threaded Debug or Multi-threaded: 1e-06
Toolset V143, Multi-threaded Debug DLL or Multi-threaded DLL: 1e-07
Toolset v142, Multi-threaded Debug or Multi-threaded: 1e-07
Toolset V142, Multi-threaded Debug DLL or Multi-threaded DLL: 1e-07
Can someone confirm this? I would be amazed if this is an actual bug in the compiler.
Thanks.