Commit 5a9a1961 by Nathan Sidwell Committed by Nathan Sidwell

tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also overloaded.

cp:
	* tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
	overloaded.
testsuite:
	* g++.dg/overload/member1.C: New test.

From-SVN: r57662
parent 7befdb9f
2002-09-30 Nathan Sidwell <nathan@codesourcery.com>
* tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
overloaded.
2002-09-30 Steve Ellcey <sje@cup.hp.com>
* class.c (build_vtbl_initializer): Add cast.
......
......@@ -1012,9 +1012,10 @@ really_overloaded_fn (x)
x = TREE_OPERAND (x, 1);
if (BASELINK_P (x))
x = BASELINK_FUNCTIONS (x);
return (TREE_CODE (x) == OVERLOAD
&& (OVL_CHAIN (x)
|| DECL_FUNCTION_TEMPLATE_P (OVL_FUNCTION (x))));
return ((TREE_CODE (x) == OVERLOAD && OVL_CHAIN (x))
|| DECL_FUNCTION_TEMPLATE_P (OVL_CURRENT (x))
|| TREE_CODE (x) == TEMPLATE_ID_EXPR);
}
/* Return the OVERLOAD or FUNCTION_DECL inside FNS. FNS can be an
......
2002-09-30 Nathan Sidwell <nathan@codesourcery.com>
* g++.dg/overload/member1.C: New test.
2002-09-30 Mark Mitchell <mark@codesourcery.com>
* g++.dg/abi/empty7.C: New test.
......
// { dg-do compile }
// Copyright (C) 2002 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 29 Sep 2002 <nathan@codesourcery.com>
struct X
{
template<typename T> static void ProcessProxy ();
typedef void (*Callback) ();
void Process (Callback);
template<typename T> void Process ()
{
Process (&ProcessProxy<T>);
}
};
void foo (X *x)
{
x->Process<int> ();
}
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