[Development] Raising the minimum to C++20

Ville Voutilainen ville.voutilainen at gmail.com
Fri May 5 12:18:46 CEST 2023

On Wed, 3 May 2023 at 03:41, Thiago Macieira <thiago.macieira at intel.com> wrote:
> C++23 is on the way, so maybe it's time for us to raise our minimum to the one
> version before that. Let's aim for Qt 6.7, because feature-freeze for 6.6 is
> within one month, and lets us warn our users this is coming.
> By this, I mean to:
> * modify our build system so Qt compiles with -std=c++20 or equivalent
> * require that user code compiling Qt headers be similarly done
> * remove the requirement for #if checks for C++17 Standard Library features
> * make a couple of C++20 features mandatory (see below)
> Of the C++20 features I currently see a good reason to make mandatory:
> * feature-test macros (no change: we're already using them)
> * spaceship operator and <compare> header
> * char8_t
> * std::is_constant_evaluated()
> * constinit
> * <bit> header
> * (maybe) designated initialisers
> * (maybe) constexpr from <algorithm> and <utility>

I don't see any of these as worth breaking embedded users who want new
Qt versions but don't yet
have the compilers that can give them these facilities.

More information about the Development mailing list