PR c++/60848
* call.c (is_std_init_list): Check CLASSTYPE_TEMPLATE_INFO.
From-SVN: r211179
+2014-06-03 Jason Merrill <jason@redhat.com>
+
+ PR c++/60848
+ * call.c (is_std_init_list): Check CLASSTYPE_TEMPLATE_INFO.
+
2014-06-02 Jason Merrill <jason@redhat.com>
PR c++/61046
type = TYPE_MAIN_VARIANT (type);
return (CLASS_TYPE_P (type)
&& CP_TYPE_CONTEXT (type) == std_node
+ && CLASSTYPE_TEMPLATE_INFO (type)
&& strcmp (TYPE_NAME_STRING (type), "initializer_list") == 0);
}
--- /dev/null
+// PR c++/60848
+// { dg-do compile { target c++11 } }
+
+namespace std
+{
+ struct initializer_list {};
+}
+
+void foo(std::initializer_list &);
+
+void f()
+{
+ foo({1, 2}); // { dg-error "" }
+}