Run headers_clean check with C++20 (gcc, clang)

The headers are already somewhat tested with C++17 in the regular
build. So let's try in the headers_clean check with C++20 instead.

Using C++20 with MSVC 19.28 doesn't work yet though:

  corelib/tools/qalgorithms.h(247): error C2039: 'popcount': is not a member of 'std'
  corelib/tools/qhashfunctions.h(311): note: see declaration of 'std'
  corelib/tools/qalgorithms.h(247): error C3861: 'popcount': identifier not found
  ...

Task-number: QTQAINFRA-4242
Change-Id: I1b48bcb9656fe1587fe03d3a17e3484c693aa295
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
Kai Köhne 2021-02-09 14:18:35 +01:00 committed by Kai Koehne
parent 6bdffefaa8
commit 1702393644

View File

@ -144,8 +144,8 @@ function(qt_internal_add_headers_clean_target
endif()
endif()
# Use strict mode C++17, with no GNU extensions (see -pedantic-errors above).
list(APPEND hcleanFLAGS -std=c++17)
# Use strict mode C++20, with no GNU extensions (see -pedantic-errors above).
list(APPEND hcleanFLAGS -std=c++2a)
set(cxx_flags ${CMAKE_CXX_FLAGS})