summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/vt-34219-2.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp0x/vt-34219-2.C')
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/vt-34219-2.C22
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/vt-34219-2.C b/gcc/testsuite/g++.dg/cpp0x/vt-34219-2.C
new file mode 100644
index 000000000..193bc0c6c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/vt-34219-2.C
@@ -0,0 +1,22 @@
+// { dg-options "-std=c++0x" }
+template<template<typename... T> class Comp, typename... T> void f( T... Value)
+{
+ static_assert( Comp<T>::value > 0, "" ); // { dg-error "parameter packs|T" }
+}
+
+template<template<typename... T> class Comp, typename... T> void g( T... Value)
+{
+ static_assert( Comp<T...>::value > 0, "" );
+}
+
+template <typename... T>
+struct Foo
+{
+ static const int value=1;
+};
+
+int main()
+{
+ f<Foo>( 2 );
+ g<Foo>( 2 );
+}