[cfe-commits] r80784 - /cfe/trunk/test/SemaTemplate/typename-specifier-4.cpp
Douglas Gregor
dgregor at apple.com
Wed Sep 2 06:07:20 PDT 2009
Author: dgregor
Date: Wed Sep 2 08:07:20 2009
New Revision: 80784
URL: http://llvm.org/viewvc/llvm-project?rev=80784&view=rev
Log:
Add a few more typename-specifier tests that involve simple-template-ids in the nested-name-specifier
Modified:
cfe/trunk/test/SemaTemplate/typename-specifier-4.cpp
Modified: cfe/trunk/test/SemaTemplate/typename-specifier-4.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaTemplate/typename-specifier-4.cpp?rev=80784&r1=80783&r2=80784&view=diff
==============================================================================
--- cfe/trunk/test/SemaTemplate/typename-specifier-4.cpp (original)
+++ cfe/trunk/test/SemaTemplate/typename-specifier-4.cpp Wed Sep 2 08:07:20 2009
@@ -43,6 +43,17 @@
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 @@
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}}
};
More information about the cfe-commits
mailing list