Re: Coding style for C++ constructs going forward

Jonathan Wakely via Gcc <[email protected]>
Newsgroups gmane.comp.gcc.devel,gmane.comp.gdb.devel
Message-ID <CAH6eHdQ4DF61x4smg=t8rOCVGH4ytcoKyovr6_FUjfu3kqkPJg@mail.gmail.com>
On Thu, 13 Aug 2020 at 07:46, Liu Hao via Gcc <[email protected]> wrote:
>
> 在 2020/8/13 上午2:40, David Blaikie 写道:
> >
> > Then use of `auto*` would make it easier for you to spot use of plain
> > pointers in your projects & scrutinize them further?
> >
>
> My point is that `auto*` conveys no more information than `auto`. The absence of `*` does not imply the object (pointer)
> being declared can never be null (apologies for this triple negation), so it complexifies coding rules and probably should
> not be used at all.

I am not aware of any significant downsides to it. You are of course
welcome to ban raw pointers from your own code, but that's not going
to happen for GCC any time soon, so maybe different rules should
apply.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.