diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-01-25 18:11:52 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-01-25 18:11:52 +0000 |
commit | 9f0f3cd94ac992bc6714b49ffe5272521ce12d77 (patch) | |
tree | 6a167ba09f9458d892c3c61b11771e50ca752963 | |
parent | a5c6c2a84cde5c9b8f8ec0610a9f89ffd54f44ee (diff) |
Add test for PR8629
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124204 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/SemaTemplate/instantiate-template-template-parm.cpp | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/test/SemaTemplate/instantiate-template-template-parm.cpp b/test/SemaTemplate/instantiate-template-template-parm.cpp index 1e3346998f..a70c7e8b08 100644 --- a/test/SemaTemplate/instantiate-template-template-parm.cpp +++ b/test/SemaTemplate/instantiate-template-template-parm.cpp @@ -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_; + }; +} |