bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#8923: 23.3; Indentation c++0x


From: Alan Mackenzie
Subject: bug#8923: 23.3; Indentation c++0x
Date: Wed, 2 Oct 2019 19:41:31 +0000
User-agent: Mutt/1.10.1 (2018-07-13)

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 via email to

[Prev in Thread] Current Thread [Next in Thread]