On 28/2/23 12:00, Hamish Moffatt via Interest wrote:
Qt5's documentation (like Qt6's) does say "QVector's value type must be an assignable data type", so the mystery here is perhaps why our code works with Qt5.


Even in Qt6, it compiles with other things in the struct that aren't assignable though, just not QVector.

        struct T
        {
                int x = 0;
        };

        struct S
        {
                //const QVector<int> v; // compiles if not const
                const T t;
                const int x = 0;
        };

        QVector<S> pv;
        pv.push_back({});



Hamish
_______________________________________________
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

Reply via email to