C++ - Support C++23 standard

The announcement about C++20 support is great!

Actually I did use the documented ( C/C++/Objective-C | SonarQube Docs )

How about C++23 ?
Is there a planned support as well? Or maybe soon a sonar.cfamily.cpp23=true to get started?

Reason is to avoid the error:
“java.lang.UnsupportedOperationException: Unsupported value of __cplusplus macro: 202100L”

Hello @schefenacker and welcome to the community.

We are glad that our effort to bring support for C++20 is appreciated.
Note that “sonar.cfamily.cpp20” is valid only for SonarQube 8.9LTS.
In SonarQube 9.x, C++20 is not an opt-in feature anymore. It is supported out-of-the-box.

Allowing any value for __cplusplus macro is tricky for us as it might lead to instability and to using our analyzer in a configuration where it has not been tested and validated.

We could imagine adding an opt-in feature for that, but there is no such plan right now.
Please, feel free to create a new feature request about that if you are interested.

About C++23, we will obviously support it at some point. It is very early to say anything meaningful about it (like features and timeline) as we are still focusing on expanding our C++20 support (parsing and rules).

By the way, out of curiosity, which feature of C++23 would you like to use and on which compiler?




A post was split to a new topic: Support for C++20 modules