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.
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
--- /dev/null
+// 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);
+}