]> granicus.if.org Git - clang/commitdiff
Add test for PR8629
authorDouglas Gregor <dgregor@apple.com>
Tue, 25 Jan 2011 18:11:52 +0000 (18:11 +0000)
committerDouglas Gregor <dgregor@apple.com>
Tue, 25 Jan 2011 18:11:52 +0000 (18:11 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124204 91177308-0d34-0410-b5e6-96231b3b80d8

test/SemaTemplate/instantiate-template-template-parm.cpp

index 1e3346998fa22afe380ecdc76fba9c6d0ceccc3b..a70c7e8b081a415017eab21c1ff5537bea710237 100644 (file)
@@ -59,3 +59,39 @@ template <int x, int y> struct lt {
 };
 
 Comp<int, lt> c0;
+
+namespace PR8629 {
+  template<template<int> class TT> struct X0
+  {
+    static void apply();
+  };
+  template<int> struct Type { };
+
+  template<class T> struct X1
+  {
+    template<class U> struct Inner;
+
+    template<class U> void g()
+    {
+      typedef Inner<U> Init;
+      X0<Init::template VeryInner>::apply();
+    }
+    template<int N> void f ()
+    {
+      g<Type<N> >();
+    }
+  };
+  template<class T> template<class U> struct X1<T>::Inner
+  {
+    template<int> struct VeryInner {
+    };
+  };
+  struct X1Container
+  {
+    X1Container()
+    {
+      simplex_.f<0>();
+    }
+    X1<double> simplex_;
+  };
+}