Commit 4c690cea by Jason Merrill Committed by Jason Merrill

re PR c++/59818 (Bogus error: call of overloaded .... is ambiguous)

	PR c++/59818
	* pt.c (tsubst_function_type): Make sure we keep the same function
	quals.

From-SVN: r207215
parent 19cef1c1
2014-01-28 Jason Merrill <jason@redhat.com>
PR c++/59818
* pt.c (tsubst_function_type): Make sure we keep the same function
quals.
PR c++/58701
* semantics.c (build_anon_member_initialization): Stop walking
when we run out of COMPONENT_REFs.
......
......@@ -11189,6 +11189,8 @@ tsubst_function_type (tree t,
else
{
tree r = TREE_TYPE (TREE_VALUE (arg_types));
/* Don't pick up extra function qualifiers from the basetype. */
r = cp_build_qualified_type_real (r, type_memfn_quals (t), complain);
if (! MAYBE_CLASS_TYPE_P (r))
{
/* [temp.deduct]
......
// PR c++/59818
template <class T>
struct Identity {
typedef T type;
};
struct Foo {
template <typename T>
Foo(T*, void (Identity<T>::type::*m)(void));
};
struct Bar {
void Method(void) const;
};
void Bar::Method(void) const
{
Foo foo(this, &Bar::Method); // { dg-error "no match" }
}
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