Details
-
Bug
-
Resolution: Done
-
P4: Low
-
5.2.0
-
None
-
VC2008 (no IDE, compiler came from the Windows SDK), debug mode, Windows 7.
-
f4cc344e01e00e640bce10f03c47b25d19c3e7fc c40a48af997f57caa0ecfca0b247837ba5b2f89b 1985f818e7c543393660c50dccfb078d9f3c4501
Description
In MSVC2008, debug mode enables several extra checks in the STL, such as checking that the range passed to std::lower_bound is actually sorted. The following code would usually only need operator<(Foo,Bar), but in VC2008 debug mode it also requires operator<(Bar,Foo) and operator<(Foo,Foo):
SomeContainer<Foo> v; Bar x; std::lower_bound(begin(v), end(v), x);
In 23d7f6ee, qBinaryFind was changed to use std::lower_bound instead of qLowerBound. This broke the build in several places, for example this error in tools/qregexp.cpp:3248:
error C2678: binary '<' : no operator found which takes a left-hand operand of type 'const CategoriesRangeMapEntry' (or there is no acceptable conversion) while trying to match the argument list '(const CategoriesRangeMapEntry, const CategoriesRangeMapEntry)'
where only operator<(CategoriesRangeMapEntry, const char*) and operator<(const char*, CategoriesRangeMapEntry) are defined.
None of this happens when compiling in release mode.
Very related bug: QTBUG-27419
Attachments
For Gerrit Dashboard: QTBUG-33473 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
65500,1 | QtDBus: fix build on MSVC2008 Debug mode. | stable | qt/qtbase | Status: MERGED | -1 | 0 |
65535,1 | Fix QTextEngine build on MSVC2008 debug mode. | dev | qt/qtbase | Status: MERGED | +2 | 0 |