random_device device;
uniform_int_distribution<long> dist(-5, 5);
vector<long> v;
v.resize(20);
generate(v.begin(), v.end(), [&] { return dist(device); }); // <- Unhandled exception.
Exception details:
Unhandled exception at 0x00AB3FDF in test.exe: 0xC000001D: Illegal Instruction.
It used to work but now fails after installing the latest Visual Studio 2019 update. Any advice and insight is appreciated.
I cannot reproduce the error on VS2019 under win10.
Normally this kind of issue comes due corrupt temporary files within .vs folder or corrupt project settings, in this case after the VS update.
What you can do is to create a fresh new project and compare/copy the setting files to the existing project (with eventually update the filepaths). Also removing .vs folder at the existing project could help.