SonarQube Scanner Error: /std:c++latest is not supported

I’m trying to set up the SonarCloud analysis in the Devops Azure pipeline for a C project which has c++ unit tests. I followed the instruction here but received an error during the SonarCloud Analysis:

##[error]ERROR: Error during SonarQube Scanner execution
##[error]java.lang.IllegalArgumentException: /std:c++latest is not supported.

I have included sonar.cpp.std=c++latest in my

Hey there.

c++latest is not supported a supported standard. When C++20 is final, you can expect it will become supported.

As noted in the documentation, the following standards are supported.

  • C89, C99, C11, C++03, C++11, C++14 and C++17 standards

I also don’t believe sonar.cpp.std is a real analysis parameter having any effect.

You’ll want to make sure your code is targeting a supported C++ standard in order to analyse your code. This isn’t done on the SonarQube side, but by changing the option in (I assume) Visual Studio.

1 Like

Hi Colin,

Thank you very much for the information you provided. I have changed the supported c++ standard to one of the projects, and the analysis is working now!

1 Like