Details
-
Bug
-
Resolution: Done
-
P2: Important
-
None
-
6.0
-
None
-
21d39168170c6833512c4a5f53985272741bd7e7 (qt/qtbase/dev)
Description
Previously i could just do
QList<Stuff> bla = something();
Stuff randomStuff = bla.at(QRandomGenerator::global()->bounded(bla.size());
and it was all nice.
Now i get a complain about
stress-threads-qt6.cpp:187:90: error: call of overloaded ‘bounded(qsizetype)’ is ambiguous
it doesn't know whether to use
QRandomGenerator::bounded(double)
or
quint32 bounded(quint32 highest)
or
int QRandomGenerator::bounded(int)
Is there a plan to fix this or do i have to pretend my list will never be longer tahn quint32 and cast to that?
Attachments
For Gerrit Dashboard: QTBUG-86318 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
314217,6 | QRandomGenerator: add 64-bit bounded() versions | dev | qt/qtbase | Status: MERGED | +2 | 0 |