Emacs 23.1.97:

 

When using the C++ scope operator "::", show-paren-mode gets confused:

 

------  Foo.cpp ------------------------------------

struct Foo1 {};

 

namespace X

{

  struct Foo2 {};

 

  template<class _Y>

  struct Bar;

 

  template<>

  struct Bar<::Foo1>         // "(show-paren-mode)" does not match `>` to `<`

  {

  };

 

  template<>

  struct Bar<Foo2>           // "(show-paren-mode)" correctly matches `>` to `<`

  {

  };

}

---------------------------------------------