summaryrefslogtreecommitdiffstats
path: root/test/SemaTemplate/deduction.cpp
diff options
context:
space:
mode:
authorTom Stellard <thomas.stellard@amd.com>2014-12-08 23:38:47 +0000
committerTom Stellard <thomas.stellard@amd.com>2014-12-08 23:38:47 +0000
commit395a76d5372abd34fa791f6c10ebcdf43d74c8bd (patch)
tree4f55959276173ea331861efc1e0e3f34d3f55da0 /test/SemaTemplate/deduction.cpp
parentb3cde23af4e18e713453781fd94f1b59be62dc08 (diff)
Merging r221832:upstream/release_35
------------------------------------------------------------------------ r221832 | richard-llvm | 2014-11-12 18:38:38 -0500 (Wed, 12 Nov 2014) | 5 lines PR19372: Keep checking template arguments after we see an argument pack expansion into a parameter pack; we know that we're still filling in that parameter's arguments. Previously, if we hit this case for an alias template, we'd try to substitute using non-canonical template arguments. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_35@223719 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaTemplate/deduction.cpp')
-rw-r--r--test/SemaTemplate/deduction.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/SemaTemplate/deduction.cpp b/test/SemaTemplate/deduction.cpp
index c089573a9c..e9422898c0 100644
--- a/test/SemaTemplate/deduction.cpp
+++ b/test/SemaTemplate/deduction.cpp
@@ -178,3 +178,17 @@ namespace PR21536 {
template<typename ...T> void f(S<T...>);
void g() { f(S<int, int>()); }
}
+
+namespace PR19372 {
+ template <template<typename...> class C, typename ...Us> struct BindBack {
+ template <typename ...Ts> using apply = C<Ts..., Us...>;
+ };
+ template <typename, typename...> struct Y;
+ template <typename ...Ts> using Z = Y<Ts...>;
+
+ using T = BindBack<Z, int>::apply<>;
+ using T = Z<int>;
+
+ using U = BindBack<Z, int, int>::apply<char>;
+ using U = Z<char, int, int>;
+}