diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2021-03-21 13:57:48 -0700 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2021-04-20 14:18:25 +0000 |
commit | c7deb3400faa1d9389137fe63ffbffade8203850 (patch) | |
tree | d9f0b26dc110ffb9ebc1b6c8d1b6fdd7fbfbb8dd /src/corelib/io/qurl.cpp | |
parent | 15b26935fca4ab14298abdcc70b3cb15b6cca195 (diff) |
QUtf8StringView: ensure binary compatibility throughout 6.xv6.1.0-rc1
We can't depend on whether the user compiles with -std=c++17 or
-std=c++20. So select what we can depend on and make that permanent.
Prior to this change:
$ cat /tmp/test.cpp
#include <QtCore/QUtf8StringView>
void f(QUtf8StringView) {}
$ qcd include
$ g++ -S -o - -I. /tmp/test.cpp | grep globl | c++filt
.globl f(QBasicUtf8StringView<false>)
$ g++ -fPIC -std=c++20 -S -o - -I. /tmp/test.cpp | grep globl | c++filt
.globl f(QBasicUtf8StringView<true>)
After this change, they're both "false". QUtf8StringView should have
been a concrete class that derived from QBsicUtf8StringView<whichever>
and inherited all its constructors. We'd cause ODR violations in C++20,
but nothing worse than what we usually do for BC reasons.
That solution is too late for Qt 6.x. Let's revisit in 7.0.
Pick-to: 6.1 dev
Change-Id: I6bcbe88c072a438b8b4efffd166e77199ecb39e3
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/corelib/io/qurl.cpp')
0 files changed, 0 insertions, 0 deletions