Details
-
Bug
-
Resolution: Done
-
Not Evaluated
-
1.19.2
-
None
Description
I have heard that I have to use "c+20" value for cxxLanguageVersion to enable C+20 support for QBS projects in other reports:
https://bugreports.qt.io/browse/QBS-1656
https://bugreports.qt.io/browse/QTCREATORBUG-26089
However,
https://doc.qt.io/qbs/qml-qbsmodules-cpp.html#cxxLanguageVersion-prop
As you can see above, there is no official way to enable C++20 in QBS project.
As least for MSVC, any invalid value for cxxLanguageVersion appends "/std:c++latest" compiler flag as you can see here: https://github.com/qbs/qbs/blob/master/share/qbs/modules/cpp/msvc.js#L96
This enables C+20 features for MSVC 2017 and 2019 but it looks very hacky way because it is undocumented and setting invalid value to cxxLanguageVersion to enable C20 is very nonintuitive. Also, there exists a problem that Qt dependency removes the "/std:c+latest" flag(https://bugreports.qt.io/browse/QBS-1656).
QBS should provide official value to enable C+20(c20) or latest C+ features(c++latest).
Attachments
For Gerrit Dashboard: QBS-1657 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
364512,2 | Documentation: Add "c++20" as possible value for cxxLanguageVersion | 1.20 | qbs/qbs | Status: MERGED | +2 | +1 |