I'm trying to use C++20 in VS Code with the Code Runner extension, which allows me to run code using ctrl+alt+n.
I have installed MinGW64 through the MSYS2 installer. My compiler version is 12.0.2.
- In my c_cpp_properties.json file, I have set
cppStandard
toc++20
. - For good measure, in my settings.json file, I added
"C_Cpp.default.cppStandard": "c++20"
. - In my tasks.json file, I have added
"-std=c++20"
to theargs
field.
When I type __cplusplus
in my C++ file and hover my mouse over it, the hover info says "# define __cplusplus 202002L
".
But the Code Runner extension is still not using C++20. Why? How can I make it use C++20?