[RFC] Increase libstdc++ line length to 100(?) columns

Ville Voutilainen ville.voutilainen@gmail.com
Fri Nov 27 08:21:38 GMT 2020


On Fri, 27 Nov 2020 at 10:16, Richard Biener via Libstdc++
<libstdc++@gcc.gnu.org> wrote:
> > Why not change this to:
> >
> > >                       if (present)
> > >                         ptr = gfc_build_conditional_assign_expr (
> > >                             block, present, ptr, nullarg);
> > >
> >
> > I think it looks balanced and way more comfortable, and doesn't waste much leading space.
>
> Other places use
>
>        if (present)
>          ptr = gfc_build_conditional_assign_expr
>                                   (block, present, ptr, nullarg);
>
> I prefer the ( on the next line.  The argument list can be two spaces
> indented from
> the function name or "right justified" (I think the latter looks
> visually better).

I find it easier to grok the code when the opening paren is on the
first line, I know instantly that I'm
looking at a function call. That sort of style probably fits better
the C++ code in libstdc++ than the code
in gcc, because in libstdc++ code we don't have a space before the
argument list.


More information about the Libstdc++ mailing list