]> gcc.gnu.org Git - gcc.git/commitdiff
re PR c++/10749 (triple nested template classes in namespace need to qualify ns)
authorMark Mitchell <mark@codesourcery.com>
Fri, 20 Jun 2003 18:55:47 +0000 (18:55 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Fri, 20 Jun 2003 18:55:47 +0000 (18:55 +0000)
PR c++/10749
* parser.c (cp_parser_class_head): See through dependent names
when parsing a class-head.

PR c++/10749
* g++.dg/template/memclass2.C: New test.

From-SVN: r68276

gcc/cp/ChangeLog
gcc/cp/parser.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/template/memclass2.C [new file with mode: 0644]

index 8ed6d9c2260f44c1232e715f7a9595e31f2c9765..88c91dbe873938c5892f6ef58437387e9eccd140 100644 (file)
@@ -1,5 +1,9 @@
 2003-06-20  Mark Mitchell  <mark@codesourcery.com>
 
+       PR c++/10749
+       * parser.c (cp_parser_class_head): See through dependent names
+       when parsing a class-head.
+
        PR c++/10845
        * pt.c (try_class_unification): Correct handling of member class
        templates.
index ffb0bf876e1e4518a906c2e2110b8eafccce5556..4799944b99481c86dcefbe436e91ceecd2e14207 100644 (file)
@@ -11634,7 +11634,7 @@ cp_parser_class_head (cp_parser* parser,
   nested_name_specifier 
     = cp_parser_nested_name_specifier_opt (parser,
                                           /*typename_keyword_p=*/false,
-                                          /*check_dependency_p=*/true,
+                                          /*check_dependency_p=*/false,
                                           /*type_p=*/false);
   /* If there was a nested-name-specifier, then there *must* be an
      identifier.  */
index dbb89db63478ae49d2c527d90e150a0a6580e0b6..9d8e41097e221afd9c2dbb79a2218938ee7fa870 100644 (file)
@@ -1,3 +1,8 @@
+2003-06-20  Mark Mitchell  <mark@codesourcery.com>
+
+       PR c++/10749
+       * g++.dg/template/memclass2.C: New test.
+
 2003-06-20  Mark Mitchell  <mark@codesourcery.com>
             Eric Botcazou  <ebotcazou@libertysurf.fr>
        
diff --git a/gcc/testsuite/g++.dg/template/memclass2.C b/gcc/testsuite/g++.dg/template/memclass2.C
new file mode 100644 (file)
index 0000000..da79d6a
--- /dev/null
@@ -0,0 +1,20 @@
+namespace ns {
+  template<typename T>
+  struct Foo {
+    template<typename U> struct Bar;
+  };
+  
+  template<typename T>
+  template<typename U>
+  struct Foo<T>::Bar {
+    template<typename V> struct Baz;
+  };
+  
+  template<typename T>
+  template<typename U>
+  template<typename V>
+  struct Foo<T>::Bar<U>::Baz {
+    Foo<T> chokes;
+    ns::Foo<T> works;
+  };
+}
This page took 0.149636 seconds and 5 git commands to generate.