From: James Dennett <jdennett@googlers.com>
To: 11386@debbugs.gnu.org
Subject: bug#11386: C++11 support: C++ mode gets (temporarily) confused by edits to convert "> >" to ">>" in templates
Date: Mon, 30 Apr 2012 14:05:29 -0700 [thread overview]
Message-ID: <CAFfXxVtpN+_81eODve0HDDLLq7OupmkoxCZH8GgnZTSaxUdYug@mail.gmail.com> (raw)
C++ mode gets confused if C++98 code is updated to omit the (now
unnecessary) space between the closing ">" angle brackets in template
argument lists.
To reproduce:
Start by typing the following (C++98) code:
int foo() {
vector<vector<string> > temp;
}
So far, so good. Now go back and remove the extra space between the
closing angle brackets. This will cause the closing } to not match
the opening { (according to emacs), so if you then add another
function below foo, you'll get something like:
int foo() {
vector<vector<string>> temp;
return 0;
}
int bar() {
}
where the indentation of everything after the function foo() is
broken. Matching of the angle brackets is also broken.
The buffer can be restored to a good state by erasing and retyping the
inner "<" in the type. Adding the extra space and removing it will
put the buffer back in a bad state. Reading the code from file (with
or without the extra space) also leaves the buffer in a good state.
next reply other threads:[~2012-04-30 21:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-30 21:05 James Dennett [this message]
2014-11-18 17:00 ` bug#11386: C++11 support: C++ mode gets (temporarily) confused by edits to convert "> >" to ">>" in templates Rüdiger Sonderfeld
[not found] ` <mailman.13959.1416330148.1147.bug-gnu-emacs@gnu.org>
2014-11-18 21:15 ` Alan Mackenzie
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=CAFfXxVtpN+_81eODve0HDDLLq7OupmkoxCZH8GgnZTSaxUdYug@mail.gmail.com \
--to=jdennett@googlers.com \
--cc=11386@debbugs.gnu.org \
/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.