[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-frameworks-devel
Subject:    Re: Updating our coding conventions and coding style for C++11
From:       Kai Uwe Broulik <kde () privat ! broulik ! de>
Date:       2020-01-16 17:46:06
Message-ID: 4e9e492b-b705-11e0-0b3c-23b7c21faf69 () privat ! broulik ! de
[Download RAW message or body]

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
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic