Coding style: white space around asterisks
David Faure
faure at kde.org
Sat Aug 10 15:13:13 BST 2019
On mardi 6 août 2019 16:44:08 CEST Roman Gilg wrote:
> Hi,
>
> Frameworks C++ coding style for pointer declarations follows the
> asterisk to the right approach like Qt coding style recommends.
>
> This is most often a sensible choice but is difficult to read in my
> opinion when there is no identifier to the right the asterisk is
> associated with, for example for function return types and casts.
>
> Because of that I prefer a style like explained here:
> https://www.quora.com/Where-should-I-put-the-asterisk-for-pointers-in-C++-Is
> -it-int*-ptr-int-*-ptr-or-int-*ptr/answer/David-Vandevoorde
>
> Any arguments for or against doing it this way?
Makes sense, but I'd like to keep the Qt and KF5 coding styles as close as
possible. So this should actually be proposed on the qt development list.
There's no good reason for Qt and KF5 to be different on this point.
--
David Faure, faure at kde.org, http://www.davidfaure.fr
Working on KDE Frameworks 5
More information about the Kde-frameworks-devel
mailing list