OSDN Git Service

/cp
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / cpp0x / initlist31.C
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist31.C b/gcc/testsuite/g++.dg/cpp0x/initlist31.C
new file mode 100644 (file)
index 0000000..ffc9855
--- /dev/null
@@ -0,0 +1,13 @@
+// PR c++/43028
+// { dg-options "-std=c++0x" }
+
+#include <initializer_list>
+
+struct string { string(std::initializer_list<char>) { } };
+
+void f() {
+  auto y =
+  {
+    string(Equation()) // { dg-error "not declared" }
+  }; // { dg-error "unable to deduce" }
+}