Updating our coding conventions and coding style for C++11

Kai Uwe Broulik kde at privat.broulik.de
Thu Jan 16 22:46:12 GMT 2020


> Well, the * is completely redundant in those cases, so it doesn't bring anything.
> I'd be tempted to say, let's not require it.
> But then it raises the question of consistency (without a guideline, we'll have some places with * and some places without *).

It provides useful visual information.

auto foo = bar();
auto baz = &bla;

where's the pointer now? Sure, your IDE probably will autocomplete 
operator-> as needed but to me it just feels odd, visually. In any case, 
I'll continue mandating that in code I maintain, even if it's not 
official policy.

Though I also thought the reference would be implied by auto but 
apparently it is not.

Cheers
Kai Uwe


More information about the Kde-frameworks-devel mailing list