Updating our coding conventions and coding style for C++11
Elvis Angelaccio
elvis.angelaccio at kde.org
Sun Jan 19 15:06:55 GMT 2020
Hi,
On 16/01/20 18:46, Kai Uwe Broulik wrote:
> 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);
IMHO the * here is redundant and only adds noise. It's clear that
`something` is a MyCustomType* and that `keyEvent` is a QKeyEvent*.
> auto &barRef = foo[bar];
This could be helpful indeed.
> Cheers
> Kai Uwe
Cheers,
Elvis
More information about the Kde-frameworks-devel
mailing list