Fix building qcompare code in MSVC in C++20 mode
MSVC quite incorrectly errors out saying that weak_ordering's conversion to partial_ordering cannot access the private constructor that takes the internal order. The problem goes away when the types are forward-declared before they are declared as friends. Fixes: QTBUG-126386 Change-Id: I50ad6d08ee648eb15109dde4a9ec9c753ee18e68 Pick-to: 6.7 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> (cherry picked from commit d2b4aec865bd834747cd824658e567b83bf081e6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
eb397a2ce9
commit
788e9d7faa
@ -62,6 +62,9 @@ constexpr O reversed(O o) noexcept
|
||||
|
||||
namespace Qt {
|
||||
|
||||
class weak_ordering;
|
||||
class strong_ordering;
|
||||
|
||||
class partial_ordering
|
||||
{
|
||||
public:
|
||||
|
Loading…
x
Reference in New Issue
Block a user