I'm running VS2019 v16.6.2
I have been following the solution to this question on how to set VS2019 to C++17 and define "ISO C++17 Standard (/std:c++17)" as the source language. However, the compiler is not using C++17 standard. I wrote the following test program to see the compilers settings. Output follows.
#include <iostream>
#include <filesystem> // C++17 standard header file name
int main() {
#if !_HAS_CXX17
printf("No C17");
#endif
printf("\n%i", _MSVC_LANG);
printf("\n%i", _HAS_CXX17);
printf("\n\nPress any key to exit.");
getchar();
return 0;
}
Output:
No C++17
201402
0
Press any key to exit.
What am I missing to set the language standard? I need to use c17 because I want to use the filesystem library.