The RecursiveList structure was defined like this:
struct RecursiveList : public QList<RecursiveList> {};
However, this definition does not make any sense when it comes to the
relational operators. QList<T> needs to have operator<() defined for
the contained type T.
The current implementation of QTypeTraits::compare_lt_result_container
simply enables operator<() if Container is a base type of the contained
type. This unblocks the compilation of checks like
static_assert(QTypeTraits::has_operator_less_than_v<RecursiveList>);
However, this is useless in practice.
This commit updates the struct to have a meaningful definition of
operator<().
Amends 9f13842fe6.
Task-number: QTBUG-120305
Pick-to: 6.5
Change-Id: Iaee96385a33ff131bdceabe945265b3285a370c2
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 58c492a4dc9868faff7e9334758947cf0027eeac)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>