[Interest] QVariantMap: constEnd() not equal to end()?

Thiago Macieira thiago.macieira at intel.com
Tue Mar 24 19:16:51 CET 2015


On Tuesday 24 March 2015 17:29:39 Gunnar Roth wrote:
> Does anybody know why QT_STRICT_ITERATORS is not standard?

First, because it breaks existing, legitimate code that mixes const and non-
const iterators properly (yes, there are legitimate ways to do it).

Second, because it's binary incompatible in QVector. The iterator for non-
strict QVector is a pointer; in strict mode, it's a class. So if you have the 
iterator in your function parameters or template parameters, it will not be 
compatible if you turn it on or off.

However, I do recommend you turn it on in your own code, along with 
QT_NO_CAST_FROM_ASCII and QT_NO_CAST_TO_ASCII.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center




More information about the Interest mailing list