Fix compilation error with MSVC 2019 and C++20

Fixes: QTBUG-97425
Pick-to: 6.1 6.2
Change-Id: Id327e3494d1deae852f953211c0409a80beafe88
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
This commit is contained in:
Sona Kurazyan 2021-10-11 15:36:53 +02:00
parent 333b40a12e
commit 64e9312464

View File

@ -1184,7 +1184,7 @@ void QRegularExpressionPrivate::doMatch(QRegularExpressionMatchPrivate *priv,
// its length is zero. We however allow it in input: a QStringView
// subject may have data == nullptr. In this case, to keep PCRE
// happy, pass a pointer to a dummy character.
constexpr char16_t dummySubject = 0;
const char16_t dummySubject = 0;
const char16_t * const subjectUtf16 = [&]()
{
const auto subjectUtf16 = priv->subject.utf16();