Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
6.9
-
None
Description
these statements compile:
qBound(0.0, 0.5, 1.0);
qBound(0.0, 0.5f, 1.0);
qBound<float>(0, 0.5f, 1);
however this does not compile:
qBound<float>(0.0, 0.5f, 1.0);
qBound(0, 0.5, 1);
qBound(0, 0.5f, 1)
furthermore the documentation only states the signature:
template <typename T> const T &qBound(const T &min, const T &val, const T &max)
while we have implementations of different signatures (which cause the above compile errors due to ambiguities).
ideally we'd have the expected behaviour that:
- qBound(a, b, c) would return decltype(b)
- qBound<T>(a, b, c) would ensure a return type of T
Attachments
Issue Links
- relates to
-
QTBUG-118877 -qreal float configuration option does not compile
- In Review
Gerrit Reviews
For Gerrit Dashboard: QTBUG-127971 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
582619,1 | Tests: add unit tests for qBounds | dev | qt/qtbase | Status: NEW | 0 | 0 |