On 1/16/20 7:46 PM, Kai Uwe Broulik wrote: > for "auto" I think we should always annotate it with const, *, and/or & > where appropriate: > > auto *something = new MyCustomType; > auto *keyEvent = static_cast<QKeyEvent *>(event); > const auto myList = QStringList({QLatin1String("FooThing"), > QLatin1String("BarThing")}); > auto &barRef = foo[bar];
I also prefer to do that. On the other hand, I'd like our code to be as close as possible to Qt's code in terms of coding style. Perhaps, this discussion must be moved to the Qt/Development mailing list unless the question of annotating auto with const/*/& had been raised before there. Cheers, Vlad