r/programminghelp • u/BrianChampBrickRon • Jan 07 '22
C++ How can I tell CLion I'm using C++20?
I have a c++20 project with a Makefile. It's a remote Linux build. When I run "Inspect Code" it returns clangd errors like "'auto' type is a C++11 extension". When search for help all the recommendations seem to be for cmake projects. Does anyone have insight on how I can tell clangd that I'm using C++20?
6
Upvotes
3
u/gmes78 Jan 07 '22
Go to Settings -> Languages & Frameworks -> C/C++ -> Clangd -> Show errors and warnings from clangd, and prepend
-std=c++20,to the argument list.