[Top][All Lists]

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

bug#11386: C++11 support: C++ mode gets (temporarily) confused by edits

From: James Dennett
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

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.

reply via email to

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