I have been porting my code from Visual Studio 2017 to Visual Studio 2019. It was building properly before. But now I am getting these errors:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.20.27508\include\list(1010): error C2280: 'std::pair<_Kty,_Ty> &std::pair<_Kty,_Ty>::operator =(volatile const std::pair<_Kty,_Ty> &)': attempting to reference a deleted function 178 114
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.20.27508\include\list(1010): error C2280: 'std::pair<_Kty,_Ty> &std::pair<_Kty,_Ty>::operator =(volatile const std::pair<_Kty,_Ty> &)': attempting to reference a deleted function 54 114
These errors do not refer to lines in my code, so I can't see what I have written that might cause them. And this code built without error in earlier versions of the tools.
Here are the project properties of the failing build:
Note: most of the projects are building fine.
With Windows SDK Version set to 7.0 and Platform Toolset set to Visual Studio 2017 - Windows XP (v141_xp) the same project builds successfully.
I understand there is a problem in my code, somewhere, but it is not showing any error in any code that belongs to the project I am building, it is only showing the error in the list
header.
I want to find the culprit code that is causing this build failure.
What scenarios would make list
give me these errors?
Why does it build fine with Windows SDK 7 and v141_xp toolset and, not with upgraded SDK and toolset?