> So, I put this concrete rule up for discussion:
> 
> Optionally you can use the “auto” keyword in the following cases. If in
> doubt, if auto could make the code less readable, do not use auto. Keep in
> mind that code is read much more often than written.
> 
> * When it avoids repetition of a type in the same statement. You should
> explicitly mention any “const”, “&” and “*” as well, even if they were
> implicit. - auto *something = new MyCustomType(…);
>    - auto *somethingElse = qobject_cast<MyOtherCustomType *>(sender());
>    - auto myFunnyListOfThings = QStringList() << QLatin1String(“FooThing”)
> << QLatin1String(“BarThing”);
> 
> * When assigning iterator types.
>    - auto it = myFunnyListOfThings.const_iterator();
I think we should stop the discussion about auto now, and simply go with those 
rules. They are fairly conservative and we can extend them later.

So: +1

daniel
_______________________________________________
Qt-creator mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/qt-creator

Reply via email to