PR c++/38649
* class.c (defaultable_fn_p): Handle ... properly.
From-SVN: r144092
2009-02-10 Jason Merrill <jason@redhat.com>
+ PR c++/38649
+ * class.c (defaultable_fn_p): Handle ... properly.
+
PR c++/36744
* tree.c (lvalue_p_1): Condition rvalue ref handling on
treat_class_rvalues_as_lvalues, too.
{
if (DECL_CONSTRUCTOR_P (fn))
{
- if (skip_artificial_parms_for (fn, DECL_ARGUMENTS (fn))
- == NULL_TREE)
+ if (FUNCTION_FIRST_USER_PARMTYPE (fn) == void_list_node)
return true;
- else if (copy_fn_p (fn) > 0)
+ else if (copy_fn_p (fn) > 0
+ && (TREE_CHAIN (FUNCTION_FIRST_USER_PARMTYPE (fn))
+ == void_list_node))
return true;
else
return false;
2009-02-11 Jason Merrill <jason@redhat.com>
+ PR c++/38649
+ * g++.dg/cpp0x/defaulted8.C: New test.
+
PR c++/36744
* g++.dg/cpp0x/rv9p.C: New test.
--- /dev/null
+// PR c++/38649
+// { dg-options "-std=c++0x" }
+
+struct A
+{
+ A(...) = default; // { dg-error "cannot be defaulted" }
+ A(const A&, ...) = default; // { dg-error "cannot be defaulted" }
+};