Subject: bug#14008: closed (Re: bug#14008: Better autoindent for C++11 code?)

From: [email-masked] (GNU bug Tracking System)
Date: Thu, 07 Nov 2019 23:42:01 +0000

Your bug report

#14008: Better autoindent for C++11 code?

which was filed against the emacs,cc-mode package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
14008: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14008
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#14008: Better autoindent for C++11 code?
From: Stefan Kangas <[email-masked]>
To: Alan Mackenzie <[email-masked]>
Cc: Andrew Pennebaker <[email-masked]>, [email-masked]
Date: Fri, 08 Nov 2019 00:41:21 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Alan Mackenzie <[email-masked]> writes:

>> Do you think there is anything more to do here, or should this bug be
>> closed?
>
> I think the bug should now be closed.

Thanks, I'm therefore closing this bug now.

Best regards,
Stefan Kangas

Subject: Better autoindent for C++11 code?
From: Andrew Pennebaker <[email-masked]>
To: [email-masked]
Date: Wed, 20 Mar 2013 11:38:58 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

C++11 introduced lambda syntax []() { ... } and other strange things that
Emacs indents strangely.

for_each(range.begin(), range.end(), [=](int i) {
    cout << strings[i] << endl;
  });

I would like the final line `});` to have the same indentation level as the
first line `for_each...`.

Here's another example:

for_each(range.begin(), range.end(), [&](int i) {
             std::async(
                        launch::async,
                        [&]() { strings[i] = fizzy(i); }
                        );
  });

The arguments to std::async and its closing parenthesis are indented much
too far; I would like them indented only one level further than where
std::async is itself indented. Any tips for achieving this?

-- 
Cheers,

Andrew Pennebaker
www.yellosoft.us