Qt::totally_ordered_wrapper: specialize QTypeInfo

Simple: just inherit the payload type's (QTypeInfoMerger isn't needed,
as the sizeof totally_ordered_wrapper<P> is the same as the sizeof P).

Yes, this means Qt::totally_ordered_wrapper<P> is marked as isPointer,
but that trait is already deprecated.

Found in API-Review.

Change-Id: I4b5df08cd4891bd463d1f127c17ed5c4cd812984
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 5bfb6d513c0692ba1b6621b2ff0b3207088eb742)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
bb10
Marc Mutz 2024-05-29 10:02:07 +02:00 committed by Qt Cherry-pick Bot
parent a092feb71a
commit bca56f277e
1 changed files with 4 additions and 0 deletions

View File

@ -16,6 +16,7 @@
#include <QtCore/qoverload.h>
#include <QtCore/qttypetraits.h>
#include <QtCore/qtypeinfo.h>
#include <QtCore/qtypes.h>
#ifdef __cpp_lib_three_way_comparison
@ -663,6 +664,9 @@ private:
} //Qt
template <typename P>
class QTypeInfo<Qt::totally_ordered_wrapper<P>> : public QTypeInfo<P> {};
QT_END_NAMESPACE
namespace std {