Commit 31d2ea2a by Jason Merrill Committed by Jason Merrill

re PR c++/48157 (Unable to match function call to member function template)

	PR c++/48157
	* pt.c (tsubst_qualified_id): Preserve TEMPLATE_ID_EXPR in
	partial instantiation.

From-SVN: r175904
parent b935c718
2011-07-05 Jason Merrill <jason@redhat.com>
PR c++/48157
* pt.c (tsubst_qualified_id): Preserve TEMPLATE_ID_EXPR in
partial instantiation.
PR c++/49598
* semantics.c (finish_id_expression): convert_from_reference.
......
......@@ -11287,8 +11287,12 @@ tsubst_qualified_id (tree qualified_id, tree args,
expr = name;
if (dependent_scope_p (scope))
return build_qualified_name (NULL_TREE, scope, expr,
QUALIFIED_NAME_IS_TEMPLATE (qualified_id));
{
if (is_template)
expr = build_min_nt (TEMPLATE_ID_EXPR, expr, template_args);
return build_qualified_name (NULL_TREE, scope, expr,
QUALIFIED_NAME_IS_TEMPLATE (qualified_id));
}
if (!BASELINK_P (name) && !DECL_P (expr))
{
......
2011-07-05 Jason Merrill <jason@redhat.com>
PR c++/48157
* g++.dg/template/template-id-4.C: New.
2011-07-05 Georg-Johann Lay <avr@gjlay.de>
* gcc.dg/pr44023.c: Add dg-require-effective-target int32plus
......
// PR c++/48157
struct AType
{
template<class AA>
void SomeFuncTemplate()
{ }
};
template < class T >
struct TTest2
{
template<T> struct helper;
template<class U>
static void check(helper<&U::template SomeFuncTemplate<int> > *);
};
int main()
{
TTest2< void (AType::*)() >::check<AType>(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