summaryrefslogtreecommitdiffstats
path: root/clang/test/CXX/temp/temp.decls/temp.variadic/p5.cpp
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2013-06-13 00:45:47 +0000
committerNick Lewycky <nicholas@mxc.ca>2013-06-13 00:45:47 +0000
commit2c308503ea8b726369dc7cb475cea7a306dc7b7e (patch)
treeea023b4e2d4d3810fb3aa2eee165f2445d2792df /clang/test/CXX/temp/temp.decls/temp.variadic/p5.cpp
parent8338716e8d4e024ab9bd0732505364bb801d13c4 (diff)
downloadbcm5719-llvm-2c308503ea8b726369dc7cb475cea7a306dc7b7e.tar.gz
bcm5719-llvm-2c308503ea8b726369dc7cb475cea7a306dc7b7e.zip
Include the unexpanded packs in the initializer expression when checking a
pack expanded constructor initializer list. Fixes PR16303! llvm-svn: 183878
Diffstat (limited to 'clang/test/CXX/temp/temp.decls/temp.variadic/p5.cpp')
-rw-r--r--clang/test/CXX/temp/temp.decls/temp.variadic/p5.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/test/CXX/temp/temp.decls/temp.variadic/p5.cpp b/clang/test/CXX/temp/temp.decls/temp.variadic/p5.cpp
index 945379872f7..218990e9bb3 100644
--- a/clang/test/CXX/temp/temp.decls/temp.variadic/p5.cpp
+++ b/clang/test/CXX/temp/temp.decls/temp.variadic/p5.cpp
@@ -410,3 +410,14 @@ namespace WorkingPaperExample {
f(h(args ...) + args ...);
}
}
+
+namespace PR16303 {
+ template<int> struct A { A(int); };
+ template<int...N> struct B {
+ template<int...M> struct C : A<N>... {
+ C() : A<N>(M)... {} // expected-error{{pack expansion contains parameter packs 'N' and 'M' that have different lengths (2 vs. 3)}} expected-error{{pack expansion contains parameter packs 'N' and 'M' that have different lengths (4 vs. 3)}}
+ };
+ };
+ B<1,2>::C<4,5,6> c1; // expected-note{{in instantiation of}}
+ B<1,2,3,4>::C<4,5,6> c2; // expected-note{{in instantiation of}}
+}
OpenPOWER on IntegriCloud