]> granicus.if.org Git - clang/commitdiff
Add a few more typename-specifier tests that involve simple-template-ids in the neste...
authorDouglas Gregor <dgregor@apple.com>
Wed, 2 Sep 2009 13:07:20 +0000 (13:07 +0000)
committerDouglas Gregor <dgregor@apple.com>
Wed, 2 Sep 2009 13:07:20 +0000 (13:07 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80784 91177308-0d34-0410-b5e6-96231b3b80d8

test/SemaTemplate/typename-specifier-4.cpp

index 2b1517e40ca169304d40dc9abd832d5044849e17..c7484c19fca7718587ebb9e78b53ce9aa6d84387 100644 (file)
@@ -43,6 +43,17 @@ struct swap_and_apply2 {
 int a2[is_same<swap_and_apply2<make_pair>::apply<int, float>::type, 
                pair<float, int> >::value? 1 : -1];
 
+template<typename MetaFun>
+struct swap_and_apply2b {
+  template<typename T1, typename T2>
+  struct apply {
+    typedef typename MetaFun::template apply<T2, T1>::type type;
+  };
+};
+
+int a3[is_same<swap_and_apply2b<make_pair>::apply<int, float>::type, 
+               pair<float, int> >::value? 1 : -1];
+
 template<typename T>
 struct X0 {
   template<typename U, typename V>
@@ -53,4 +64,7 @@ struct X0 {
 
   void f1(X0<T>::Inner<T*, T&>); // expected-note{{here}}
   void f1(typename X0<T>::template Inner<T*, T&>); // expected-error{{redecl}}
+
+  void f2(typename X0<T>::Inner<T*, T&>::type); // expected-note{{here}}
+  void f2(typename X0<T>::template Inner<T*, T&>::type); // expected-error{{redecl}}
 };