[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 22:46:12
Message-ID: bd58df1e-47fd-3c2e-848f-43b8a9b58776 () privat ! broulik ! de
[Download RAW message or body]


> 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


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

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