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
|
||
|---|---|---|
| .. | ||
| .gitignore | ||
| CMakeLists.txt | ||
| tst_collections.cpp | ||