Updating our coding conventions and coding style for C++11
Kai Uwe Broulik
kde at privat.broulik.de
Thu Jan 16 17:46:06 GMT 2020
Hi,
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];
> The common practice used in KDE seems to be:
>
> for (a<space>:<space>b)
+1
Cheers
Kai Uwe
More information about the Kde-frameworks-devel
mailing list