From: Tom Tromey <tom@tromey.com>
To: Jason Merrill via Gcc <gcc@gcc.gnu.org>
Cc: Jason Merrill <jason@redhat.com>
Subject: Re: lambda coding style
Date: Thu, 11 Jan 2024 10:45:24 -0700 [thread overview]
Message-ID: <87h6jjrcgb.fsf@tromey.com> (raw)
In-Reply-To: <7b2c4b10-4134-4f1b-9597-de66d6072f16@redhat.com> (Jason Merrill via Gcc's message of "Wed, 10 Jan 2024 14:58:03 -0500")
>>>>> "Jason" == Jason Merrill via Gcc <gcc@gcc.gnu.org> writes:
Jason> I think we probably want the same formatting for lambdas in function
Jason> argument lists, e.g.
Jason> algorithm ([] (parms)
Jason> {
Jason> return foo;
Jason> });
Jason> Any other opinions?
FWIW gdb did pretty much this same thing. Our rules are documented
here:
https://sourceware.org/gdb/wiki/Internals%20GDB-C-Coding-Standards#Indentation_of_lambdas_as_parameters
There's a special case in here where a call takes a single lambda as the
last argument -- gdb indents that in a more block-like way.
Tom
next prev parent reply other threads:[~2024-01-11 17:45 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-10 19:58 Jason Merrill
2024-01-10 20:47 ` I am causing valgrind errors Robert Dubner
2024-01-10 20:51 ` Jakub Jelinek
2024-01-10 21:17 ` Robert Dubner
2024-01-10 20:59 ` lambda coding style Marek Polacek
2024-01-10 21:24 ` Jason Merrill
2024-01-10 21:41 ` Marek Polacek
2024-01-11 2:34 ` Jason Merrill
2024-01-11 5:30 ` waffl3x
2024-01-20 2:22 ` Hans-Peter Nilsson
2024-01-11 17:45 ` Tom Tromey [this message]
2024-01-11 17:48 ` Martin Jambor
[not found] ` <65328.124011112484300622@us-mta-617.us.mimecast.lan>
2024-01-11 19:25 ` Jason Merrill
2024-01-12 11:06 ` Martin Jambor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87h6jjrcgb.fsf@tromey.com \
--to=tom@tromey.com \
--cc=gcc@gcc.gnu.org \
--cc=jason@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).