Commit d30a17fc by Jason Merrill Committed by Jason Merrill

re PR c++/53858 ([C++11] template aliases used in template parameters default expression)

	PR c++/53858
	* name-lookup.c (ambiguous_decl): Use DECL_TYPE_TEMPLATE_P.

From-SVN: r189331
parent f8b54112
2012-07-06 Jason Merrill <jason@redhat.com>
PR c++/53858
* name-lookup.c (ambiguous_decl): Use DECL_TYPE_TEMPLATE_P.
2012-07-05 Jason Merrill <jason@redhat.com>
PR c++/53039
......
......@@ -4059,7 +4059,7 @@ ambiguous_decl (struct scope_binding *old, cxx_binding *new_binding, int flags)
/* If we expect types or namespaces, and not templates,
or this is not a template class. */
if ((LOOKUP_QUALIFIERS_ONLY (flags)
&& !DECL_CLASS_TEMPLATE_P (val)))
&& !DECL_TYPE_TEMPLATE_P (val)))
val = NULL_TREE;
break;
case TYPE_DECL:
......
2012-07-06 Jason Merrill <jason@redhat.com>
PR c++/53858
* g++.dg/cpp0x/alias-decl-20.C: New.
2012-07-06 Tom de Vries <tom@codesourcery.com>
PR tree-optimization/51879
......
// PR c++/53858
// { dg-do compile { target c++11 } }
template <typename T> struct s0 { typedef T tdef0; };
template <typename T> struct s1 { typedef T tdef1; };
template <typename T> using us1 = typename s1<T>::tdef1;
template <typename T, typename TT = typename us1<T>::tdef0> struct s2 {};
int main () { 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