summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/initlist15.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp0x/initlist15.C')
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist15.C20
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist15.C b/gcc/testsuite/g++.dg/cpp0x/initlist15.C
new file mode 100644
index 000000000..b75cc8172
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist15.C
@@ -0,0 +1,20 @@
+// { dg-options "-std=c++0x" }
+
+// Just discard errors pointing at header files
+// { dg-prune-output "include" }
+
+#include <vector>
+#include <typeinfo>
+
+using namespace std;
+
+template< typename ... ArgTypes >
+void test( ArgTypes ... args ) {
+ vector<type_info*> x = { &typeid(ArgTypes)... }; // { dg-error "" }
+}
+
+int main()
+{
+ test( 1, 3.14f, 2.78 );
+ return 0;
+}