Hello! I recently compiled the new version of kwin 6.3.0 using clang 19 and encountered a compilation error ``` In file included from /var/tmp/portage/kde-plasma/kwin-6.3.0/work/kwin-6.3.0/src/osd.cpp:7: In file included from /var/tmp/portage/kde-plasma/kwin-6.3.0/work/kwin-6.3.0/src/osd.h:10: In file included from /usr/include/qt6/QtCore/QFlags:1: In file included from /usr/include/qt6/QtCore/qflags.h:7: /usr/include/qt6/QtCore/qcompare_impl.h:26:49: error: no member named 'is_null_pointer_v' in namespace 'std' 26 | template <typename T, std::enable_if_t<std::is_null_pointer_v<T>, bool> = true> | ~~~~~^ /usr/include/qt6/QtCore/qcompare_impl.h:26:67: error: 'T' does not refer to a value 26 | template <typename T, std::enable_if_t<std::is_null_pointer_v<T>, bool> = true> | ^ /usr/include/qt6/QtCore/qcompare_impl.h:26:24: note: declared here 26 | template <typename T, std::enable_if_t<std::is_null_pointer_v<T>, bool> = true> | ^ /usr/include/qt6/QtCore/qcompare_impl.h:26:77: error: expected member name or ';' after declaration specifiers 26 | template <typename T, std::enable_if_t<std::is_null_pointer_v<T>, bool> = true> | ^ 3 errors generated. ``` After figuring out the code a bit, after setting the flag gnu/c++=20 this section of code compiled fine SUMMARY STEPS TO REPRODUCE 1. Have llvm-clang-19 with libcxx{abi} 2. Compile kwin project with default flags SOFTWARE/OS VERSIONS Linux/KDE Plasma: 6.13.2-cachyos (64-bit)/6.3.0 KDE Plasma Version: 6.3.0 KDE Frameworks Version: 6.10.0 Qt Version: 6.8.2
Created attachment 178170 [details] qtbase inclde patch I encountered this as well, and I believe it's actually a QT bug. "qcompare_impl.h" appears to be missing an include for "<type_traits>", it must have been pulled in by a transitive include under C++20. I attached a patch for qtbase that I'm using which fixes compilation with clang.
Please report to Qt/submit the patch to them thanks.