java.lang.IllegalArgumentException: /std:c++23preview is not supported

Hello,

I’m trying to set up SonarQube analysis for a Windows (MSVC) C++23 codebase. Unfortunately, I’m getting the error: java.lang.IllegalArgumentException: /std:c++23preview is not supported.. According to the documentation it seems that C++23 is supported. Am I doing something wrong?

SonarQube Server: v2025.3.1
SonarScanner CLI: 7.1.0.4889

Thank you in advance.

Hello @neusdan

Thanks for reaching out. Our analyzer supports C++23, but doesn’t recognize the specific /std:c++23preview flag yet.

As a workaround, please replace the flag in your compile commands to either /std:c++23 or /std:c++latest.

We plan to add support for this preview flag in a future release.

Thanks,

Hello,

/std:c++23 does not exist yet. But i’ll try the /std:c++latest workaround. Thank you.