Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
6.3.0 Beta2
-
None
-
3
-
de6a004bc5 (qt/qtbase/dev) de6a004bc5 (qt/tqtc-qtbase/dev) 5711f58410 (qt/qtbase/6.3) 22455bab78 (qt/qtbase/6.2) 22455bab78 (qt/tqtc-qtbase/6.2) 5711f58410 (qt/tqtc-qtbase/6.3)
-
Team A Foundation Sprint 53, Team A Foundation Sprint 54, Team A Foundation Sprint 55
Description
When trying to compile tst_qbytearrayview using GCC 11.2 C++20 -fsanitize=undefined, I get:
tests/auto/corelib/text/qbytearrayview/tst_qbytearrayview.cpp:309:23: error: non-constant condition for static assertion 309 | static_assert(!bv.isNull()); | ^~~~~~~~~~~~ src/corelib/text/qbytearrayview.h:318:67: error: ‘(((const char*)(& hello)) == 0)’ is not a constant expression 318 | [[nodiscard]] constexpr bool isNull() const noexcept { return !data(); } | ^~~~~~~
tst_qstringview_check, otoh, works. It seems QBAV is missing the __builtin_constant_p / std::is_const_evaluated() stuff that QSV has.