Commit 9f57f76a by Jason Merrill Committed by Jason Merrill

re PR c++/56971 (GCC claims a friend function to be overloaded, but it isn't)

	PR c++/56971
	* pt.c (any_template_arguments_need_structural_equality_p): A
	TEMPLATE_TEMPLATE_PARM can require structural type comparison.

From-SVN: r199315
parent 9797bec9
2013-05-24 Jason Merrill <jason@redhat.com>
PR c++/56971
* pt.c (any_template_arguments_need_structural_equality_p): A
TEMPLATE_TEMPLATE_PARM can require structural type comparison.
2013-05-24 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/19618
......
......@@ -20367,8 +20367,7 @@ any_template_arguments_need_structural_equality_p (tree args)
if (error_operand_p (arg))
return true;
else if (TREE_CODE (arg) == TEMPLATE_DECL
|| TREE_CODE (arg) == TEMPLATE_TEMPLATE_PARM)
else if (TREE_CODE (arg) == TEMPLATE_DECL)
continue;
else if (TYPE_P (arg) && TYPE_STRUCTURAL_EQUALITY_P (arg))
return true;
......
// PR c++/56971
template <typename T>
class rp {
};
template <template <typename> class P>
struct b {
template <class, template <typename> class FriendP>
friend void f(b<FriendP> from);
};
template <class, template <typename> class P>
void f(b<P> from) {
}
int main() {
b<rp> v;
f<int>(v);
return 0;
}
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