question for Qt C++20 support
-
I haven't seen any official documentation on Qt6 claiming full support for C++20. Does it only support some features of C++20? In Visual Studio 2019/2022, there is support for C++20. Does anyone know more about this? For now, I assume that Qt only partially supports C++20. I would appreciate any insights
-
Christian Ehrlicher Lifetime Qt Championreplied to Teemo of LOL on last edited by Christian Ehrlicher
@Teemo-of-LOL what exactly do you miss?
Qt 6 can be compiled with c++20 so what's the point of your question? -
@Christian-Ehrlicher I'm curious whether it provides partial support or full 100% support, and I'd like to see related official website content on this matter.
-
What does full support mean?
There are threads on the Qt development mailing list and tickets in the Qt bug tracker that discuss different aspects of the language. For a more targeted question (eg can Qt APIs be imported as modules), a more concrete answer is possible.
-
@Teemo-of-LOL Your question makes no sense. Qt is a library. What does it mean for a library to have 100% language support?
For example C++20 added
std::span
or explicit aggregate initialization. What kind of support would Qt provide for them?Are you maybe confusing Qt with a compiler? Those are two different things. A status of compiler support for given language and library version is listed here. Qt has nothing to do with it.
-
@Chris-Kawa It seems like I didn't explain well. I was wondering if it fully supports C++17 like the content on this website https://www.qt.io/blog/qt-6.0-released, or if it only partially supports it. Did I misunderstand something? Aren't there two categories: supporting some parts of the C++ standard or supporting it entirely?
-
@Teemo-of-LOL again: that's a compiler thing.
What Qt might do is use features from the standard but it can only do so for the subset that is supported by the compilers of all officially supported platforms.
Using features from one of the standard also means that Qt users will have to have such a compiler at hand. Hence the bar raised to C++11 for Qt 5 and C++17 for Qt 6.
-
@Teemo-of-LOL said:
Aren't there two categories: supporting some parts of the C++ standard or supporting it entirely?
When it comes to a compiler yes, you could say that. When it comes to a library, like Qt, no, that statement makes no sense.
The article you linked is talking about Qt using some features from the C++17 standard and thus requiring a compiler that provides this language version.