I'm trying to run C++11 in my project. I add the compiler flag /std:c++11 to the compiler, but when I check the version and print it out, it shows as C++98. This is in Visual Studio 2019.
This is what I'm using to print the language, and it shows as C++98:
if (__cplusplus == 201703L) std::cout << "C++17\n";
else if (__cplusplus == 201402L) std::cout << "C++14\n";
else if (__cplusplus == 201103L) std::cout << "C++11\n";
else if (__cplusplus == 199711L) std::cout << "C++98\n";
else std::cout << "pre-standard C++\n";
std::cout << "C++ langauge supported = " << __cplusplus << "\n";