Subject: c++-mode closing nested template angle braces breaks font-lock, indentation and show-paren-mode.

From: Matt Renaud <[email-masked]>
Date: Mon, 23 Jan 2012 21:46:01 -0500

*Emacs Version: *24.0.92.2

When writing C++ code with nested templates, putting two (or more) closing
angle braces together causes the font-lock, show-paren-mode and indentation
to break.  Positioning point on any of the closing parentheses fails to
show the matching opening brace which makes template meta-programs
difficult to read.  Any nested templates will cause this.  The following is
a simple example showing the 2 cases:

template <typename T = std::vector<int>>
  struct foo    // Indentation broken here...
  {
  };

int main()
{
  std::vector<std::vector<int>> vv_int; // Font-lock broken here...

  return 0;
}