Commit fab8f0b6 by Jason Merrill Committed by Jason Merrill

re PR c++/57252 (GCC does not treat ref-qualified overload set as ambiguous)

	PR c++/57252
	* decl.c (decls_match): Compare ref-qualifiers.

From-SVN: r198841
parent aa7e6aad
2013-05-13 Jason Merrill <jason@redhat.com>
PR c++/57252
* decl.c (decls_match): Compare ref-qualifiers.
2013-05-10 Jason Merrill <jason@redhat.com>
PR c++/57196
......
......@@ -1024,6 +1024,7 @@ decls_match (tree newdecl, tree olddecl)
else
types_match =
compparms (p1, p2)
&& type_memfn_rqual (f1) == type_memfn_rqual (f2)
&& (TYPE_ATTRIBUTES (TREE_TYPE (newdecl)) == NULL_TREE
|| comp_type_attributes (TREE_TYPE (newdecl),
TREE_TYPE (olddecl)) != 0);
......
// PR c++/57252
// { dg-require-effective-target c++11 }
struct foo {
void bar() & {}
void bar() && {}
};
int main()
{
auto p = &foo::bar; // { dg-error "" }
(foo{}.*p)();
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment