summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/initlist35.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp0x/initlist35.C')
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist35.C24
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist35.C b/gcc/testsuite/g++.dg/cpp0x/initlist35.C
new file mode 100644
index 000000000..e5b7cb4bd
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist35.C
@@ -0,0 +1,24 @@
+// PR c++/41510
+// { dg-options "-std=c++0x" }
+
+struct B
+{
+ B(int, int);
+};
+struct A
+{
+ A(int, int);
+ A(const B&);
+};
+
+void f()
+{
+ A a = { 1, 2 };
+};
+
+template <class T> void g()
+{
+ A a = { 1, 2 };
+};
+
+template void g<int>();