[Interest] (no subject)
Thiago Macieira
thiago.macieira at intel.com
Sat Jun 27 18:20:55 CEST 2015
On Saturday 27 June 2015 16:45:28 Prav wrote:
> > Whatever the original reason was: The possibility to change the original
> > container while iterating over it with foreach might be a bit 'special',
> > but is not that uncommon. I don't think we can change therefore the
> > behavior anymore.
> If you read my question:
> Although current implementation of iterator-loop have the right to exist but
> in this case I would expect it to co-exist with another iterator-loop which
> works in more straightforward for developers way (with just const-ref to
> container).
If the copying version works for the Qt containers, we're happy. We're not
going to add another macro that doesn't copy for the sub-microsecond
optimisation in Qt containers, thus making the API uglier and developers more
confused.
> As you see I am wondering why only one way of doing loop exists.
Because providing subtly different options confuses when it is right to use
each one.
Please tell me: which smart pointer is best for each situation?
QSharedPointer, QScopedPointer, QSharedDataPointer,
QExplicitlySharedDataPointer, QPointer, std::unique_ptr.
When should you use QStringLiteral, QString::fromLatin1 or QLatin1String?
We will not add another macro for this.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
More information about the Interest
mailing list