all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: Stefan Kangas <stefan@marxist.se>
Cc: Nicolai Bodd <nicolai.bodd@gmail.com>, 8923@debbugs.gnu.org
Subject: bug#8923: 23.3; Indentation c++0x
Date: Wed, 2 Oct 2019 19:41:31 +0000	[thread overview]
Message-ID: <20191002194131.GA15875@ACM> (raw)
In-Reply-To: <CADwFkmm45UayGR6iaNyquLJGCJC=_-n0MVR5YpuOcHGtavW-aQ@mail.gmail.com>

Hello Stefan and Nicolai.

On Wed, Oct 02, 2019 at 11:37:02 +0200, Stefan Kangas wrote:
> Nicolai Bodd <nicolai.bodd@gmail.com> writes:

Nicolai, I'm sorry I missed your bug report originally.  At the time, I
had no idea how to go about implementing (what was to become) C++11.  I
didn't really get started on the job until spring 2012.

> > I honestly don’t know if this has been resolved. I am fine with this
> > item being closed.
> [...]
> > >> Emacs should support a c++0x, when it comes to indentation of
> > >> lamdas and for_each.

> Thanks for reporting back.  I think we should try to get confirmation
> that this has indeed been implemented first, so let's hear what Alan
> has to say.

Yes, lambda forms and the "colon" form of for:

    for (foo : <collection>) {}

have both been implemented.

> In the meantime, it would be helpful if we could have an example of
> some code where this indentation applies.  That would help us verify
> that it works as expected.  Would you be willing to help provide such
> an example?

There is an extensive regression test suite for CC Mode at
http://cc-mode.sourceforge.net, contained in the CC Mode repository.  It
focuses almost entirely on (static) indentation and fontification.  It
gets updated fairly frequently, as new bugs come to light.

Examples of C++ lambda expression and for statements are in this test
suite.  E.g., forloop-7.cc looks like:

static void DoFoo(const CXXRecordDecl *Class) {
    for (auto *Friend : Class->friends()) {}
}

> Best regards,
> Stefan Kangas

-- 
Alan Mackenzie (Nuremberg, Germany).





  reply	other threads:[~2019-10-02 19:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-23  0:18 bug#8923: 23.3; Indentation c++0x Nicolai Bodd
2019-10-01 20:11 ` Stefan Kangas
2019-10-02  5:50   ` Nicolai Bodd
2019-10-02  9:37     ` Stefan Kangas
2019-10-02 19:41       ` Alan Mackenzie [this message]
2019-10-03  3:48         ` Stefan Kangas

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=20191002194131.GA15875@ACM \
    --to=acm@muc.de \
    --cc=8923@debbugs.gnu.org \
    --cc=nicolai.bodd@gmail.com \
    --cc=stefan@marxist.se \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.